X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-net-tokio%2Fsrc%2Flib.rs;h=98932c0eaa638d86a9fd9faefc271fc5b9ceb97c;hb=cd4cc203a2bbb716c8747bd45ac84e42b8f53b84;hp=be41a2401244f0bff743e44b9e7ec26482d95227;hpb=871db638f23867006b4b7ec941a92b6709ccab9e;p=rust-lightning diff --git a/lightning-net-tokio/src/lib.rs b/lightning-net-tokio/src/lib.rs index be41a240..98932c0e 100644 --- a/lightning-net-tokio/src/lib.rs +++ b/lightning-net-tokio/src/lib.rs @@ -208,7 +208,12 @@ impl Connection { break Disconnect::CloseConnection; } }, - SelectorOutput::B(_) => {}, + SelectorOutput::B(some) => { + // The mpsc Receiver should only return `None` if the write side has been + // dropped, but that shouldn't be possible since its referenced by the Self in + // `us`. + debug_assert!(some.is_some()); + }, SelectorOutput::C(res) => { if res.is_err() { break Disconnect::PeerDisconnected; } match reader.try_read(&mut buf) { @@ -556,7 +561,6 @@ mod tests { use lightning::ln::features::*; use lightning::ln::msgs::*; use lightning::ln::peer_handler::{MessageHandler, PeerManager}; - use lightning::ln::features::NodeFeatures; use lightning::routing::gossip::NodeId; use lightning::events::*; use lightning::util::test_utils::TestNodeSigner; @@ -620,8 +624,11 @@ mod tests { fn handle_open_channel_v2(&self, _their_node_id: &PublicKey, _msg: &OpenChannelV2) {} fn handle_accept_channel_v2(&self, _their_node_id: &PublicKey, _msg: &AcceptChannelV2) {} fn handle_stfu(&self, _their_node_id: &PublicKey, _msg: &Stfu) {} + #[cfg(dual_funding)] fn handle_splice(&self, _their_node_id: &PublicKey, _msg: &Splice) {} + #[cfg(dual_funding)] fn handle_splice_ack(&self, _their_node_id: &PublicKey, _msg: &SpliceAck) {} + #[cfg(dual_funding)] fn handle_splice_locked(&self, _their_node_id: &PublicKey, _msg: &SpliceLocked) {} fn handle_tx_add_input(&self, _their_node_id: &PublicKey, _msg: &TxAddInput) {} fn handle_tx_add_output(&self, _their_node_id: &PublicKey, _msg: &TxAddOutput) {}