Skip to content

Commit 770f5bf

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 770f5bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ impl OnionMessageHandler for IgnoringMessageHandler {
128128
fn timer_tick_occurred(&self) {}
129129
fn provided_node_features(&self) -> NodeFeatures { NodeFeatures::empty() }
130130
fn provided_init_features(&self, _their_node_id: &PublicKey) -> InitFeatures {
131-
InitFeatures::empty()
131+
let mut features = InitFeatures::empty();
132+
features.set_gossip_queries_optional();
133+
features
132134
}
133135
}
134136
impl OffersMessageHandler for IgnoringMessageHandler {

0 commit comments

Comments
 (0)