From 294b3472b308f71a19102d4332934e8982e6150f Mon Sep 17 00:00:00 2001 From: echennells Date: Tue, 23 Jun 2026 20:54:09 -0700 Subject: [PATCH] Fix get_client_filters livelock in protocol_filter_out_70015 handle_receive_get_filters returned false (desubscribe) after dispatching a response, and send_filter resubscribed via SUBSCRIBE_CHANNEL when the ancestry was exhausted. The resubscribe runs inside the notify cycle, re-entering the handler for the in-flight message and pegging a core (100% CPU livelock). Stay subscribed (return true) and drop the per-request resubscribe. This is the BIP157 compact-filter sibling of the protocol_transaction_out_106 get_data fix; the other two handlers here (get_filter_checkpoint, get_filter_headers) already return true and are unaffected. --- src/protocols/protocol_filter_out_70015.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/protocols/protocol_filter_out_70015.cpp b/src/protocols/protocol_filter_out_70015.cpp index 06348d85..6ac5d4bd 100644 --- a/src/protocols/protocol_filter_out_70015.cpp +++ b/src/protocols/protocol_filter_out_70015.cpp @@ -222,7 +222,7 @@ bool protocol_filter_out_70015::handle_receive_get_filters(const code& ec, span(events::ancestry_msecs, start); send_filter(error::success, ancestry); - return false; + return true; } void protocol_filter_out_70015::send_filter(const code& ec, @@ -233,11 +233,7 @@ void protocol_filter_out_70015::send_filter(const code& ec, return; if (ancestry->empty()) - { - // Complete, resubscribe to get_client_filters. - SUBSCRIBE_CHANNEL(get_client_filters, handle_receive_get_filters, _1, _2); return; - } const auto& query = archive(); const auto start = logger::now();