Skip to content

Commit 6d4f105

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 55a7a03 commit 6d4f105

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,9 +1383,8 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
13831383
});
13841384
continue;
13851385
}
1386-
(msgs::DecodeError::UnknownRequiredFeature, ty) => {
1387-
log_gossip!(self.logger, "Received a message with an unknown required feature flag or TLV, you may want to update!");
1388-
self.enqueue_message(peer, &msgs::WarningMessage { channel_id: [0; 32], data: format!("Received an unknown required feature/TLV in message type {:?}", ty) });
1386+
(msgs::DecodeError::UnknownRequiredFeature, _) => {
1387+
log_debug!(self.logger, "Received a message with an unknown required feature flag or TLV, you may want to update!");
13891388
return Err(PeerHandleError { });
13901389
}
13911390
(msgs::DecodeError::UnknownVersion, _) => return Err(PeerHandleError { }),

0 commit comments

Comments
 (0)