From: Elias Rohrer Date: Thu, 21 Mar 2024 07:51:10 +0000 (+0100) Subject: Signal `GossipQuery` support when using `IgnoringMessagHandler` X-Git-Tag: v0.0.123-beta~25^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=843079df72435b8a117e8b12b42492391409259f;p=rust-lightning Signal `GossipQuery` support when using `IgnoringMessagHandler` With its v24.02 release CLN made `GossipQueries` a required feature, leading to a incompatibility between LDK and CLN when using `IgnoringMessagHandler` as a `RoutingMessageHandler`, which is usually the case when a node uses RGS. To fix this issue, we let `IgnoringMessagHandler` signal `GossipQuery` support, just to go ahead and ignore every gossip message the peer will send us. While this is nonsensical and still might result in some unnecessary bandwidth wasted, we have to do something to fix the incompatibility. --- diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index 11cdd906a..535f9a486 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -116,7 +116,9 @@ impl RoutingMessageHandler for IgnoringMessageHandler { fn handle_query_short_channel_ids(&self, _their_node_id: &PublicKey, _msg: msgs::QueryShortChannelIds) -> Result<(), LightningError> { Ok(()) } fn provided_node_features(&self) -> NodeFeatures { NodeFeatures::empty() } fn provided_init_features(&self, _their_node_id: &PublicKey) -> InitFeatures { - InitFeatures::empty() + let mut features = InitFeatures::empty(); + features.set_gossip_queries_optional(); + features } fn processing_queue_high(&self) -> bool { false } }