aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-29 13:02:01 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-29 23:24:56 +0000
commitd68a63e40439850cfc66f8525b35986a6371fa47 (patch)
tree200f691c7fcadfa81169b92ec500a72d3100e219 /src/wallet/wallet2.cpp
parentMerge pull request #511 (diff)
downloadmonero-d68a63e40439850cfc66f8525b35986a6371fa47.tar.xz
wallet: cancellable refresh
^C while in manual refresh will cancel the refresh, since that's often an annoying thing to have to wait for. Also, a manual refresh command will interrupt any running background refresh and take over, rather than wait for the background refresh to be done, and look to be hanging.
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index c4df78ba9..ba7fe93b3 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -680,6 +680,7 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re
get_short_chain_history(short_chain_history);
pull_blocks(start_height, blocks_start_height, short_chain_history, blocks);
+ m_run.store(true, std::memory_order_relaxed);
while(m_run.load(std::memory_order_relaxed))
{
try