Clarify the error message when we disconnect a peer
authorMatt Corallo <git@bluematt.me>
Fri, 21 Apr 2023 14:39:01 +0000 (14:39 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 21 Apr 2023 14:39:01 +0000 (14:39 +0000)
commit61c22c581dd5991777627e1a12538a4257759162
tree3f96e13da2fc83d1042867b77dc5d85a6bce5d8c
parent9d5adfcd1003df37edf2fae42284ae6772a42237
Clarify the error message when we disconnect a peer

We very regularly receive confusion over the super generic
"Peer sent invalid data or we decided to disconnect due to a
protocol error" message, which doesn't say very much. Usually, we
end up disconnecting because we have a duplicate connection with a
peer, which doesn't merit such a scary message.

Instead, here we clarify the error message to just refer to the
fact that we're disconnecting, and note that its usually a dup
connection in a parenthetical.
lightning/src/ln/peer_handler.rs