mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 07:17:40 +01:00
Don't advertise onion messages in known channel features
This commit is contained in:
parent
90f5906082
commit
9c3b6d2edd
1 changed files with 11 additions and 1 deletions
|
@ -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<T: sealed::InitialRoutingSync> Features<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: sealed::OnionMessages> Features<T> {
|
||||
pub(crate) fn clear_onion_messages(mut self) -> Self {
|
||||
<T as sealed::OnionMessages>::clear_bits(&mut self.flags);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: sealed::ShutdownAnySegwit> Features<T> {
|
||||
#[cfg(test)]
|
||||
pub(crate) fn clear_shutdown_anysegwit(mut self) -> Self {
|
||||
|
|
Loading…
Add table
Reference in a new issue