Consistent tracking of disconnected peers (#2650)

## Issue Addressed

N/A

## Proposed Changes

When peers switching to a disconnecting state, decrement the disconnected peers counter. This also downgrades some crit logs to errors. 

I've also added a re-sync point when peers get unbanned the disconnected peer count will match back to the number of disconnected peers if it has gone out of sync previously.
This commit is contained in:
Age Manning
2021-09-30 04:31:43 +00:00
parent db4d72c4f1
commit 29a8865d07
4 changed files with 20 additions and 15 deletions

View File

@@ -672,7 +672,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
}
peer_info.is_connected()
} else {
crit!(self.log, "Status'd peer is unknown"; "peer_id" => %peer_id);
error!(self.log, "Status'd peer is unknown"; "peer_id" => %peer_id);
false
}
}