mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 23:31:07 +00:00
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 <alexandru.gheorghe@parity.io> * Move from error to warn Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
This commit is contained in:
committed by
GitHub
parent
109287f4ca
commit
5559b752b4
@@ -222,7 +222,7 @@ impl PeerStoreInner {
|
||||
if peer_info.reputation < BANNED_THRESHOLD {
|
||||
self.protocols.iter().for_each(|handle| handle.disconnect_peer(peer_id));
|
||||
|
||||
log::trace!(
|
||||
log::warn!(
|
||||
target: LOG_TARGET,
|
||||
"Report {}: {:+} to {}. Reason: {}. Banned, disconnecting.",
|
||||
peer_id,
|
||||
|
||||
Reference in New Issue
Block a user