From eb6469b7a58fa888f14fa7f27d18566a8a24ca43 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 10 Dec 2020 15:44:38 +0000 Subject: [PATCH] protocol: fix switchting to adding blocks if noone's adding the next span --- src/cryptonote_protocol/cryptonote_protocol_handler.inl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 40fbd91b2..de78d26a5 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -2309,8 +2309,7 @@ skip: uint64_t start_height; std::vector 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");