diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-15 11:38:59 +0100 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-15 11:38:59 +0100 |
| commit | 6edb1b3e468e4ea5eca131114ee3ff26af3bcba0 (patch) | |
| tree | 8b67c0f14dbc316481e52832491df4afc5f90cf8 /src/cryptonote_protocol/block_queue.cpp | |
| parent | 70495665f95cd453f2fc89d2ec5f7c2643e79f14 (diff) | |
| download | monzero-core-6edb1b3e468e4ea5eca131114ee3ff26af3bcba0.tar.gz monzero-core-6edb1b3e468e4ea5eca131114ee3ff26af3bcba0.tar.xz monzero-core-6edb1b3e468e4ea5eca131114ee3ff26af3bcba0.zip | |
block_queue: do not add empty spans
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); |
