Skip to content

Commit 9ea58cc

Browse files
committed
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.
1 parent 0a2d1d9 commit 9ea58cc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lightning/src/ln/peer_handler.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1358,9 +1358,8 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
13581358
});
13591359
continue;
13601360
}
1361-
(msgs::DecodeError::UnknownRequiredFeature, ty) => {
1362-
log_gossip!(self.logger, "Received a message with an unknown required feature flag or TLV, you may want to update!");
1363-
self.enqueue_message(peer, &msgs::WarningMessage { channel_id: [0; 32], data: format!("Received an unknown required feature/TLV in message type {:?}", ty) });
1361+
(msgs::DecodeError::UnknownRequiredFeature, _) => {
1362+
log_debug!(self.logger, "Received a message with an unknown required feature flag or TLV, you may want to update!");
13641363
return Err(PeerHandleError { });
13651364
}
13661365
(msgs::DecodeError::UnknownVersion, _) => return Err(PeerHandleError { }),

0 commit comments

Comments
 (0)