Skip to content

Commit 843079d

Browse files
committed
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.
1 parent 5e41425 commit 843079d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightning/src/ln/peer_handler.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ impl RoutingMessageHandler for IgnoringMessageHandler {
116116
fn handle_query_short_channel_ids(&self, _their_node_id: &PublicKey, _msg: msgs::QueryShortChannelIds) -> Result<(), LightningError> { Ok(()) }
117117
fn provided_node_features(&self) -> NodeFeatures { NodeFeatures::empty() }
118118
fn provided_init_features(&self, _their_node_id: &PublicKey) -> InitFeatures {
119-
InitFeatures::empty()
119+
let mut features = InitFeatures::empty();
120+
features.set_gossip_queries_optional();
121+
features
120122
}
121123
fn processing_queue_high(&self) -> bool { false }
122124
}

0 commit comments

Comments
 (0)