]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Remove unreachable warning message send on UnknownRequiredFeature read
authorWilmer Paulino <wilmer@wilmerpaulino.com>
Thu, 18 May 2023 19:02:24 +0000 (12:02 -0700)
committerWilmer Paulino <wilmer@wilmerpaulino.com>
Fri, 26 May 2023 21:40:17 +0000 (14:40 -0700)
`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.

lightning/src/ln/peer_handler.rs

index 059ccde489c11b50920ac30b11a38350ce622446..000e754c53bea88133beca43561b3e28b6a7d9b1 100644 (file)
@@ -1383,9 +1383,8 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
                                                                                                        });
                                                                                                        continue;
                                                                                                }
-                                                                                               (msgs::DecodeError::UnknownRequiredFeature, ty) => {
-                                                                                                       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 { }),