aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cryptonote_core/blockchain.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 3d0e81af1..33407bf95 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -5021,6 +5021,8 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete
unsigned nblocks = batches;
if (i < extra)
++nblocks;
+ if (nblocks == 0)
+ break;
tpool.submit(&waiter, boost::bind(&Blockchain::block_longhash_worker, this, thread_height, epee::span<const block>(&blocks[thread_height - height], nblocks), std::ref(maps[i])), true);
thread_height += nblocks;
}