aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-10 15:44:38 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-10 15:46:29 +0000
commite83a22060352c7b4e0c972337ebe23e05e4ab206 (patch)
tree5891c3710e64334018bc45e5e3412d28a91db5d3
parentMerge pull request #7010 (diff)
downloadmonero-e83a22060352c7b4e0c972337ebe23e05e4ab206.tar.xz
protocol: fix switchting to adding blocks if noone's adding the next span
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index a72b7db79..33927e9fa 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -2260,8 +2260,7 @@ skip:
uint64_t start_height;
std::vector<cryptonote::block_complete_entry> blocks;
boost::uuids::uuid span_connection_id;
- bool filled = false;
- if (m_block_queue.get_next_span(start_height, blocks, span_connection_id, filled) && filled)
+ if (m_block_queue.get_next_span(start_height, blocks, span_connection_id, true))
{
LOG_DEBUG_CC(context, "No other thread is adding blocks, resuming");
MLOG_PEER_STATE("will try to add blocks next");