X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Ffeatures.rs;h=9509f0f23bf6e1c5e7a5d0c66da2a7e3c8bdc58b;hb=c1d8cb9710c7a430ba68a32c26d8ceb88007ff14;hp=34dd28337215e1413f557a8ed1dc0e4497d180a3;hpb=1ac3fccd980af35f38ef3b5a0f4a348ec21bd000;p=rust-lightning diff --git a/lightning/src/ln/features.rs b/lightning/src/ln/features.rs index 34dd2833..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,21 +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() - } -} - -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() - } } impl InvoiceFeatures { @@ -785,6 +767,7 @@ impl Features { impl Features { + #[cfg(test)] pub(crate) fn clear_gossip_queries(mut self) -> Self { ::clear_bits(&mut self.flags); self @@ -793,6 +776,7 @@ 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