Skip to content

Commit 5559b75

Browse files
authored
substrate: peer_store: log warn on disconnecting because of reputation (#1299)
* substrate: peer_store: log error on disconnecting because of reputation Disconnecting and banning a peer because of negative reputation is usually an indicative of one of two things: 1. We've got a bug that forces disconnects. 2. We've got malicious peers that try to attack us. We both cases I don't think we should hide this behind a trace log and we should log errors, so that things are easy to notice and debug/mitigated. Signed-off-by: Alexandru Gheorghe <[email protected]> * Move from error to warn Signed-off-by: Alexandru Gheorghe <[email protected]> --------- Signed-off-by: Alexandru Gheorghe <[email protected]>
1 parent 109287f commit 5559b75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

substrate/client/network/src/peer_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ impl PeerStoreInner {
222222
if peer_info.reputation < BANNED_THRESHOLD {
223223
self.protocols.iter().for_each(|handle| handle.disconnect_peer(peer_id));
224224

225-
log::trace!(
225+
log::warn!(
226226
target: LOG_TARGET,
227227
"Report {}: {:+} to {}. Reason: {}. Banned, disconnecting.",
228228
peer_id,

0 commit comments

Comments
 (0)