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 | 70495665f95cd453f2fc89d2ec5f7c2643e79f14 (diff) | |
| parent | 35e01a6e505fc614484f6d880bcc7b83f35e6486 (diff) | |
| download | monzero-core-c1f651175a1019d40a82ed1957c5a6ff8cb020fa.tar.gz monzero-core-c1f651175a1019d40a82ed1957c5a6ff8cb020fa.tar.xz monzero-core-c1f651175a1019d40a82ed1957c5a6ff8cb020fa.zip | |
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); |
