From 741d3ec47be548bfa172ba5323bba2391e44f2c7 Mon Sep 17 00:00:00 2001 From: selsta Date: Tue, 14 Jul 2026 20:40:22 +0200 Subject: [PATCH] protocol: flush rejected block spans from disconnected peers (cherry picked from commit dfa2d3020be5cc6dcd4a525bc1b7a315b9e83f57) --- src/cryptonote_protocol/cryptonote_protocol_handler.inl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index b5bd51d39..1dcfe0a09 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -1478,6 +1478,7 @@ namespace cryptonote if (!m_core.prepare_handle_incoming_blocks(blocks, pblocks)) { LOG_ERROR_CCONTEXT("Failure in prepare_handle_incoming_blocks"); + m_block_queue.flush_spans(span_connection_id, true); drop_connections(span_origin); return 1; } @@ -2825,6 +2826,7 @@ skip: template void t_cryptonote_protocol_handler::drop_connection(const boost::uuids::uuid& id) { + m_block_queue.flush_spans(id, true); m_p2p->for_connection(id, [this](cryptonote_connection_context& context, nodetool::peerid_type peer_id, uint32_t f)->bool{ // This _could be_ outside of strand, so careful on actions drop_connection(context, true, false);