aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-14 16:10:00 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-14 16:10:00 +0200
commit8b90e3141a57049622dbdb1b62f85a97325e1084 (patch)
tree81caff108c7a4d0bbb8d11da20ba598562d49fd4 /src/wallet
parentMerge pull request #3385 (diff)
parentwallet2: handle no blocks returned in refresh to mean no new blocks (diff)
downloadmonero-8b90e3141a57049622dbdb1b62f85a97325e1084.tar.xz
Merge pull request #3386
9abeff59 wallet2: handle no blocks returned in refresh to mean no new blocks (moneromooo-monero)
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 1702eb129..8b29e71db 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2191,6 +2191,11 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re
std::list<cryptonote::block_complete_entry> next_blocks;
std::vector<cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices> next_o_indices;
bool error = false;
+ if (blocks.empty())
+ {
+ refreshed = false;
+ break;
+ }
tpool.submit(&waiter, [&]{pull_next_blocks(start_height, next_blocks_start_height, short_chain_history, blocks, next_blocks, next_o_indices, error);});
process_blocks(blocks_start_height, blocks, o_indices, added_blocks);