blockchain: fix pedantic assert

This commit is contained in:
selsta 2021-09-26 13:54:35 +02:00
parent 1e663e8488
commit a492c4e3ab
No known key found for this signature in database
GPG Key ID: 2EA0A99A8B07AE5E
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}