mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 08:08:53 +00:00
block_queue: fix late sanity check off by one
This commit is contained in:
parent
b7719022fd
commit
dc0b86ab4b
@ -240,7 +240,7 @@ std::pair<uint64_t, uint64_t> block_queue::reserve_span(uint64_t first_block_hei
|
|||||||
MDEBUG("reserve_span: early out: first_block_height " << first_block_height << ", last_block_height " << last_block_height << ", max_blocks " << max_blocks);
|
MDEBUG("reserve_span: early out: first_block_height " << first_block_height << ", last_block_height " << last_block_height << ", max_blocks " << max_blocks);
|
||||||
return std::make_pair(0, 0);
|
return std::make_pair(0, 0);
|
||||||
}
|
}
|
||||||
if (block_hashes.size() >= last_block_height)
|
if (block_hashes.size() > last_block_height)
|
||||||
{
|
{
|
||||||
MDEBUG("reserve_span: more block hashes than fit within last_block_height: " << block_hashes.size() << " and " << last_block_height);
|
MDEBUG("reserve_span: more block hashes than fit within last_block_height: " << block_hashes.size() << " and " << last_block_height);
|
||||||
return std::make_pair(0, 0);
|
return std::make_pair(0, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user