diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-08-15 20:42:47 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-08-15 20:42:47 +0200 |
commit | c1f651175a1019d40a82ed1957c5a6ff8cb020fa (patch) | |
tree | 81a9a20f8db3e50aeed78a9c9ee101cea9d91854 /src/cryptonote_protocol/block_queue.cpp | |
parent | Merge pull request #2284 (diff) | |
parent | cryptonote_protocol: fix "holes" in block download schedule (diff) | |
download | monero-c1f651175a1019d40a82ed1957c5a6ff8cb020fa.tar.xz |
Merge pull request #2295
35e01a6e cryptonote_protocol: fix "holes" in block download schedule (moneromooo-monero)
3da1edfd cryptonote_protocol: fix out of order addition (moneromooo-monero)
6edb1b3e block_queue: do not add empty spans (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_protocol/block_queue.cpp')
-rw-r--r-- | src/cryptonote_protocol/block_queue.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/block_queue.cpp b/src/cryptonote_protocol/block_queue.cpp index 610637637..4f760582b 100644 --- a/src/cryptonote_protocol/block_queue.cpp +++ b/src/cryptonote_protocol/block_queue.cpp @@ -189,6 +189,8 @@ std::pair<uint64_t, uint64_t> block_queue::reserve_span(uint64_t first_block_hei ++i; ++span_length; } + if (span_length == 0) + return std::make_pair(0, 0); MDEBUG("Reserving span " << span_start_height << " - " << (span_start_height + span_length - 1) << " for " << connection_id); add_blocks(span_start_height, span_length, connection_id, time); set_span_hashes(span_start_height, connection_id, hashes); |