diff options
author | selsta <selsta@sent.at> | 2021-09-26 13:54:35 +0200 |
---|---|---|
committer | selsta <selsta@sent.at> | 2021-10-14 02:42:02 +0200 |
commit | a492c4e3ab45fbe7f0d8267f9c02a34cf0df15f0 (patch) | |
tree | 8cf66c3f52a8f4dbb1a54f5b54815d2d383a6b38 | |
parent | Increase timeout for the mining test 4 times (to 240s) (diff) | |
download | monero-a492c4e3ab45fbe7f0d8267f9c02a34cf0df15f0.tar.xz |
blockchain: fix pedantic assert
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 |
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; } |