Skip to content

Commit 10b471d

Browse files
committed
Stop relying on the *Features::known method in net-tokio
As we move towards specify supported/required feature bits in the module(s) where they are supported, the global `known` feature set constructors no longer make sense. Here we stop relying on the `known` method in the `lightning-net-tokio` crate.
1 parent 4846570 commit 10b471d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning-net-tokio/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ mod tests {
582582
fn handle_reply_short_channel_ids_end(&self, _their_node_id: &PublicKey, _msg: ReplyShortChannelIdsEnd) -> Result<(), LightningError> { Ok(()) }
583583
fn handle_query_channel_range(&self, _their_node_id: &PublicKey, _msg: QueryChannelRange) -> Result<(), LightningError> { Ok(()) }
584584
fn handle_query_short_channel_ids(&self, _their_node_id: &PublicKey, _msg: QueryShortChannelIds) -> Result<(), LightningError> { Ok(()) }
585-
fn provided_node_features(&self) -> NodeFeatures { NodeFeatures::known() }
586-
fn provided_init_features(&self, _their_node_id: &PublicKey) -> InitFeatures { InitFeatures::known() }
585+
fn provided_node_features(&self) -> NodeFeatures { NodeFeatures::empty() }
586+
fn provided_init_features(&self, _their_node_id: &PublicKey) -> InitFeatures { InitFeatures::empty() }
587587
}
588588
impl ChannelMessageHandler for MsgHandler {
589589
fn handle_open_channel(&self, _their_node_id: &PublicKey, _their_features: InitFeatures, _msg: &OpenChannel) {}
@@ -616,8 +616,8 @@ mod tests {
616616
}
617617
fn handle_channel_reestablish(&self, _their_node_id: &PublicKey, _msg: &ChannelReestablish) {}
618618
fn handle_error(&self, _their_node_id: &PublicKey, _msg: &ErrorMessage) {}
619-
fn provided_node_features(&self) -> NodeFeatures { NodeFeatures::known() }
620-
fn provided_init_features(&self, _their_node_id: &PublicKey) -> InitFeatures { InitFeatures::known() }
619+
fn provided_node_features(&self) -> NodeFeatures { NodeFeatures::empty() }
620+
fn provided_init_features(&self, _their_node_id: &PublicKey) -> InitFeatures { InitFeatures::empty() }
621621
}
622622
impl MessageSendEventsProvider for MsgHandler {
623623
fn get_and_clear_pending_msg_events(&self) -> Vec<MessageSendEvent> {

0 commit comments

Comments
 (0)