aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-01-29 16:45:46 +0200
committerRiccardo Spagni <ric@spagni.net>2019-01-29 16:45:47 +0200
commit227bf1407e06dfdc7c6ef89826474519b61a8b86 (patch)
tree65f5f5e3e05f89419c34b4c342af5c61b94cc195
parentMerge pull request #5062 (diff)
parentblock_queue: fix late sanity check off by one (diff)
downloadmonero-227bf1407e06dfdc7c6ef89826474519b61a8b86.tar.xz
Merge pull request #5104
dc0b86ab block_queue: fix late sanity check off by one (moneromooo-monero)
Diffstat (limited to '')
-rw-r--r--src/cryptonote_protocol/block_queue.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/block_queue.cpp b/src/cryptonote_protocol/block_queue.cpp
index 672696944..716b0c8ba 100644
--- a/src/cryptonote_protocol/block_queue.cpp
+++ b/src/cryptonote_protocol/block_queue.cpp
@@ -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);
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);
return std::make_pair(0, 0);