X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fpeer_handler.rs;h=68a7ef952702b31436ea18ff27bb83f3b67b3fe3;hb=8c5ca95d9915020a025034d85e15c1a39c3ec08a;hp=bfa3a45de903ed31d244846afea17c7afdde7b78;hpb=e6aaf7c72dac650d4351a0d3e4fe4c8e9ab37911;p=rust-lightning diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index bfa3a45d..68a7ef95 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -151,7 +151,7 @@ impl ChannelMessageHandler for ErroringMessageHandler { fn handle_funding_signed(&self, their_node_id: &PublicKey, msg: &msgs::FundingSigned) { ErroringMessageHandler::push_error(self, their_node_id, msg.channel_id); } - fn handle_funding_locked(&self, their_node_id: &PublicKey, msg: &msgs::FundingLocked) { + fn handle_channel_ready(&self, their_node_id: &PublicKey, msg: &msgs::ChannelReady) { ErroringMessageHandler::push_error(self, their_node_id, msg.channel_id); } fn handle_shutdown(&self, their_node_id: &PublicKey, _their_features: &InitFeatures, msg: &msgs::Shutdown) { @@ -258,8 +258,13 @@ pub trait SocketDescriptor : cmp::Eq + hash::Hash + Clone { /// descriptor. #[derive(Clone)] pub struct PeerHandleError { - /// Used to indicate that we probably can't make any future connections to this peer, implying - /// we should go ahead and force-close any channels we have with it. + /// Used to indicate that we probably can't make any future connections to this peer (e.g. + /// because we required features that our peer was missing, or vice versa). + /// + /// While LDK's [`ChannelManager`] will not do it automatically, you likely wish to force-close + /// any channels with this peer or check for new versions of LDK. + /// + /// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager pub no_connection_possible: bool, } impl fmt::Debug for PeerHandleError { @@ -1204,8 +1209,8 @@ impl P wire::Message::FundingSigned(msg) => { self.message_handler.chan_handler.handle_funding_signed(&their_node_id, &msg); }, - wire::Message::FundingLocked(msg) => { - self.message_handler.chan_handler.handle_funding_locked(&their_node_id, &msg); + wire::Message::ChannelReady(msg) => { + self.message_handler.chan_handler.handle_channel_ready(&their_node_id, &msg); }, wire::Message::Shutdown(msg) => { @@ -1481,8 +1486,8 @@ impl P log_bytes!(msg.channel_id)); self.enqueue_message(&mut *get_peer_for_forwarding!(node_id), msg); }, - MessageSendEvent::SendFundingLocked { ref node_id, ref msg } => { - log_debug!(self.logger, "Handling SendFundingLocked event in peer_handler for node {} for channel {}", + MessageSendEvent::SendChannelReady { ref node_id, ref msg } => { + log_debug!(self.logger, "Handling SendChannelReady event in peer_handler for node {} for channel {}", log_pubkey!(node_id), log_bytes!(msg.channel_id)); self.enqueue_message(&mut *get_peer_for_forwarding!(node_id), msg);