From: Valentine Wallace Date: Fri, 9 Sep 2022 16:41:23 +0000 (-0400) Subject: Don't advertise onion messages in known channel features X-Git-Tag: v0.0.111~5^2~1 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=9c3b6d2edd1dc33ef53a8b79ed27db20fd89135e;p=rust-lightning Don't advertise onion messages in known channel features --- diff --git a/lightning/src/ln/features.rs b/lightning/src/ln/features.rs index 34dd28337..642298f56 100644 --- a/lightning/src/ln/features.rs +++ b/lightning/src/ln/features.rs @@ -559,13 +559,16 @@ impl InitFeatures { Self::known() .clear_initial_routing_sync() .clear_gossip_queries() + .clear_onion_messages() } } impl NodeFeatures { /// Returns the set of known node features that are related to channels. pub fn known_channel_features() -> NodeFeatures { - Self::known().clear_gossip_queries() + Self::known() + .clear_gossip_queries() + .clear_onion_messages() } } @@ -799,6 +802,13 @@ impl Features { } } +impl Features { + pub(crate) fn clear_onion_messages(mut self) -> Self { + ::clear_bits(&mut self.flags); + self + } +} + impl Features { #[cfg(test)] pub(crate) fn clear_shutdown_anysegwit(mut self) -> Self {