diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-10-11 13:00:27 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-10-11 13:00:27 -0500 |
commit | 3d9c805e230f7c473863478331ba044fd07dbd16 (patch) | |
tree | 5507987fe8628117c1a386eb78a82ac2c6152057 /src | |
parent | Merge pull request #7972 (diff) | |
parent | blockchain: fix pedantic assert (diff) | |
download | monero-3d9c805e230f7c473863478331ba044fd07dbd16.tar.xz |
Merge pull request #7975
48a0997 blockchain: fix pedantic assert (selsta)
Diffstat (limited to 'src')
-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 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; } |