From: Wilmer Paulino Date: Thu, 18 May 2023 19:02:24 +0000 (-0700) Subject: Remove unreachable warning message send on UnknownRequiredFeature read X-Git-Tag: v0.0.116-alpha1~27^2~2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=6d4f105536ecd82ef030c7778d4dd2a85fef8483;p=rust-lightning Remove unreachable warning message send on UnknownRequiredFeature read `enqueue_message` simply adds the message to the outbound queue, it still needs to be written to the socket with `do_attempt_write_data`. However, since we immediately return an error causing the socket to be closed, the message never actually gets sent. --- diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index 059ccde48..000e754c5 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -1383,9 +1383,8 @@ impl { - log_gossip!(self.logger, "Received a message with an unknown required feature flag or TLV, you may want to update!"); - self.enqueue_message(peer, &msgs::WarningMessage { channel_id: [0; 32], data: format!("Received an unknown required feature/TLV in message type {:?}", ty) }); + (msgs::DecodeError::UnknownRequiredFeature, _) => { + log_debug!(self.logger, "Received a message with an unknown required feature flag or TLV, you may want to update!"); return Err(PeerHandleError { }); } (msgs::DecodeError::UnknownVersion, _) => return Err(PeerHandleError { }),