mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 16:27:39 +00:00
wallet api: pause refresh while commiting tx
This commit is contained in:
parent
f233c01c8f
commit
48c0cb1ba6
1 changed files with 2 additions and 0 deletions
|
@ -102,6 +102,7 @@ bool PendingTransactionImpl::commit(const std::string &filename, bool overwrite)
|
||||||
}
|
}
|
||||||
// Commit tx
|
// Commit tx
|
||||||
else {
|
else {
|
||||||
|
m_wallet.pauseRefresh();
|
||||||
while (!m_pending_tx.empty()) {
|
while (!m_pending_tx.empty()) {
|
||||||
auto & ptx = m_pending_tx.back();
|
auto & ptx = m_pending_tx.back();
|
||||||
m_wallet.m_wallet->commit_tx(ptx);
|
m_wallet.m_wallet->commit_tx(ptx);
|
||||||
|
@ -133,6 +134,7 @@ bool PendingTransactionImpl::commit(const std::string &filename, bool overwrite)
|
||||||
m_status = Status_Error;
|
m_status = Status_Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_wallet.startRefresh();
|
||||||
return m_status == Status_Ok;
|
return m_status == Status_Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue