log upgrades + prevent dialing of disconnecting peers (#3148)

## Issue Addressed
We still ping peers that are considered in a disconnecting state

## Proposed Changes

Do not ping peers once we decide they are disconnecting
Upgrade logs about ignored rpc messages

## Additional Info
--
This commit is contained in:
Divma
2022-04-13 03:54:43 +00:00
parent b49b4291a3
commit 580d2f7873
4 changed files with 51 additions and 1 deletions

View File

@@ -213,6 +213,8 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
ScoreUpdateResult::Disconnect => {
// The peer has transitioned to a disconnect state and has been marked as such in
// the peer db. We must inform libp2p to disconnect this peer.
self.inbound_ping_peers.remove(peer_id);
self.outbound_ping_peers.remove(peer_id);
self.events.push(PeerManagerEvent::DisconnectPeer(
*peer_id,
GoodbyeReason::BadScore,