aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorselsta <selsta@sent.at>2021-09-26 13:54:35 +0200
committerselsta <selsta@sent.at>2021-10-11 19:09:45 +0200
commit48a0997d8cfe66b1a79159d7949424ef857a01f0 (patch)
tree405c45fb71d34e9a8d4c54ef68a94223560a5cd1
parentMerge pull request #7945 (diff)
downloadmonero-48a0997d8cfe66b1a79159d7949424ef857a01f0.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 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;
}