aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorselsta <selsta@sent.at>2021-09-26 13:54:35 +0200
committerselsta <selsta@sent.at>2021-10-14 02:42:02 +0200
commita492c4e3ab45fbe7f0d8267f9c02a34cf0df15f0 (patch)
tree8cf66c3f52a8f4dbb1a54f5b54815d2d383a6b38
parentIncrease timeout for the mining test 4 times (to 240s) (diff)
downloadmonero-a492c4e3ab45fbe7f0d8267f9c02a34cf0df15f0.tar.xz
blockchain: fix pedantic assert
-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 18d5e5dac..7097fc140 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -5037,6 +5037,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;
}