X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Fln%2Ffeatures.rs;h=9509f0f23bf6e1c5e7a5d0c66da2a7e3c8bdc58b;hb=c1d8cb9710c7a430ba68a32c26d8ceb88007ff14;hp=642298f56ed52265952eb2b4642163a06f5b0474;hpb=9c3b6d2edd1dc33ef53a8b79ed27db20fd89135e;p=rust-lightning diff --git a/lightning/src/ln/features.rs b/lightning/src/ln/features.rs index 642298f5..9509f0f2 100644 --- a/lightning/src/ln/features.rs +++ b/lightning/src/ln/features.rs @@ -168,9 +168,6 @@ mod sealed { , ], optional_features: [ - // Note that if new "non-channel-related" flags are added here they should be - // explicitly cleared in InitFeatures::known_channel_features and - // NodeFeatures::known_channel_features. // Byte 0 DataLossProtect | InitialRoutingSync | UpfrontShutdownScript | GossipQueries, // Byte 1 @@ -552,24 +549,6 @@ impl InitFeatures { pub(crate) fn to_context(&self) -> Features { self.to_context_internal() } - - /// Returns the set of known init features that are related to channels. At least some of - /// these features are likely required for peers to talk to us. - pub fn known_channel_features() -> 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() - .clear_onion_messages() - } } impl InvoiceFeatures { @@ -788,6 +767,7 @@ impl Features { impl Features { + #[cfg(test)] pub(crate) fn clear_gossip_queries(mut self) -> Self { ::clear_bits(&mut self.flags); self @@ -796,19 +776,13 @@ impl Features { impl Features { // Note that initial_routing_sync is ignored if gossip_queries is set. + #[cfg(test)] pub(crate) fn clear_initial_routing_sync(mut self) -> Self { ::clear_bits(&mut self.flags); self } } -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 {