aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-01-28 22:17:43 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-01-28 22:17:43 +0000
commitdc0b86ab4b3ee834d0327458c195fa191152bcf2 (patch)
treeb129428bcd9908c15e608dd4ce25a36f40c90af2 /src
parentMerge pull request #5068 (diff)
downloadmonero-dc0b86ab4b3ee834d0327458c195fa191152bcf2.tar.xz
block_queue: fix late sanity check off by one
Diffstat (limited to 'src')
-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);