Skip to content

Commit

Permalink
Signal GossipQuery support when using IgnoringMessagHandler
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tnull committed Mar 21, 2024
1 parent 5e41425 commit 770f5bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lightning/src/ln/peer_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ impl OnionMessageHandler for IgnoringMessageHandler {
fn timer_tick_occurred(&self) {}
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
}
}
impl OffersMessageHandler for IgnoringMessageHandler {
Expand Down

0 comments on commit 770f5bf

Please sign in to comment.