aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-11 21:13:54 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-11 21:16:15 +0000
commit9abeff59112db79bc192bc6d9a009e24490cb501 (patch)
tree27fd57e2e1d6c42e909b09b69f52216a718f41bb /src/wallet/wallet2.cpp
parentMerge pull request #3368 (diff)
downloadmonero-9abeff59112db79bc192bc6d9a009e24490cb501.tar.xz
wallet2: handle no blocks returned in refresh to mean no new blocks
This is not a possible return from the daemon, but I want this in now so all wallets handle this when the daemon starts doing so.
Diffstat (limited to '')
-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 d845dd896..e0a313df1 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2182,6 +2182,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);