Post to worker thread in qt wallet when doing write tx's on io threads (#2256)

* Post to worker in qt wallet when doing write tx's

* Remove unnecessary work post as it is already wrapped in a UI post
This commit is contained in:
cryptocode 2019-08-27 22:23:54 +02:00 committed by GitHub
commit 3b86ce6470
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1411,8 +1411,10 @@ void nano_qt::wallet::update_connected ()
void nano_qt::wallet::empty_password ()
{
this->node.alarm.add (std::chrono::steady_clock::now () + std::chrono::seconds (3), [this]() {
auto transaction (wallet_m->wallets.tx_begin_write ());
wallet_m->enter_password (transaction, std::string (""));
this->node.worker.push_task ([this]() {
auto transaction (wallet_m->wallets.tx_begin_write ());
wallet_m->enter_password (transaction, std::string (""));
});
});
}