From: Matt Corallo Date: Tue, 17 Aug 2021 00:03:31 +0000 (+0000) Subject: Ensure we always at least log at TRACE when a peer disconnects X-Git-Tag: v0.0.101~34^2~3 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=2e02aa7dab1228863b602b7db7b67d8bd7dbee9d;p=rust-lightning Ensure we always at least log at TRACE when a peer disconnects --- diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index 42b269411..234b50956 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -667,6 +667,7 @@ impl PeerManager Ok(res), Err(e) => { + log_trace!(self.logger, "Peer sent invalid data or we decided to disconnect due to a protocol error"); self.disconnect_event_internal(peer_descriptor, e.no_connection_possible); Err(e) } @@ -1344,6 +1345,9 @@ impl PeerManager { match peer.their_node_id { Some(node_id) => { + log_trace!(self.logger, + "Handling disconnection of peer {}, with {}future connection to the peer possible.", + log_pubkey!(node_id), if no_connection_possible { "no " } else { "" }); peers.node_id_to_descriptor.remove(&node_id); self.message_handler.chan_handler.peer_disconnected(&node_id, no_connection_possible); },