mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 12:11:59 +00:00
Downgrades a valid log (#2057)
## Issue Addressed #2046 ## Proposed Changes The log was originally intended to verify the correct logic and ordering of events when scoring peers. The queued tasks can be structured in such a way that peers can be banned after they are disconnected. Therefore the error log is now downgraded to debug log.
This commit is contained in:
@@ -474,8 +474,9 @@ impl<TSpec: EthSpec> PeerDB<TSpec> {
|
||||
// Check and verify all the connection states
|
||||
match info.connection_status() {
|
||||
PeerConnectionStatus::Disconnected { .. } => {
|
||||
// It should not be possible to ban a peer that is already disconnected.
|
||||
error!(log_ref, "Banning a disconnected peer"; "peer_id" => %peer_id);
|
||||
// It is possible to ban a peer that has a disconnected score, if there are many
|
||||
// events that score it poorly and are processed after it has disconnected.
|
||||
debug!(log_ref, "Banning a disconnected peer"; "peer_id" => %peer_id);
|
||||
self.disconnected_peers = self.disconnected_peers.saturating_sub(1);
|
||||
info.ban();
|
||||
self.banned_peers_count
|
||||
|
||||
Reference in New Issue
Block a user