From 7f32990bc94b8a457b735dcb345254d214c45210 Mon Sep 17 00:00:00 2001 From: Marc Date: Fri, 13 Dec 2024 06:05:18 +0000 Subject: [PATCH] Send UselessPeer on invalid network id (#7899) --- .../Nethermind.Network.Stats/Model/DisconnectReason.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Nethermind/Nethermind.Network.Stats/Model/DisconnectReason.cs b/src/Nethermind/Nethermind.Network.Stats/Model/DisconnectReason.cs index 4ca1a3373d1..00ae41cf54b 100644 --- a/src/Nethermind/Nethermind.Network.Stats/Model/DisconnectReason.cs +++ b/src/Nethermind/Nethermind.Network.Stats/Model/DisconnectReason.cs @@ -78,10 +78,10 @@ public static EthDisconnectReason ToEthDisconnectReason(this DisconnectReason di DisconnectReason.SessionAlreadyExist or DisconnectReason.ReplacingSessionWithOppositeDirection or DisconnectReason.OppositeDirectionCleanup or DisconnectReason.DuplicatedConnection or DisconnectReason.SessionIdAlreadyExists => EthDisconnectReason.AlreadyConnected, DisconnectReason.ConnectionClosed or DisconnectReason.OutgoingConnectionFailed => EthDisconnectReason.TcpSubSystemError, DisconnectReason.IncompatibleP2PVersion => EthDisconnectReason.IncompatibleP2PVersion, - DisconnectReason.InvalidNetworkId or DisconnectReason.InvalidGenesis or DisconnectReason.MissingForkId or DisconnectReason.InvalidForkId => EthDisconnectReason.BreachOfProtocol, + DisconnectReason.InvalidGenesis or DisconnectReason.MissingForkId or DisconnectReason.InvalidForkId => EthDisconnectReason.BreachOfProtocol, DisconnectReason.ClientFiltered => EthDisconnectReason.DisconnectRequested, DisconnectReason.ProtocolInitTimeout => EthDisconnectReason.ReceiveMessageTimeout, - DisconnectReason.SnapServerNotImplemented or DisconnectReason.TxFlooding or DisconnectReason.NoCapabilityMatched => EthDisconnectReason.UselessPeer, + DisconnectReason.InvalidNetworkId or DisconnectReason.SnapServerNotImplemented or DisconnectReason.TxFlooding or DisconnectReason.NoCapabilityMatched => EthDisconnectReason.UselessPeer, DisconnectReason.DropWorstPeer => EthDisconnectReason.TooManyPeers, DisconnectReason.PeerRemoved or DisconnectReason.PeerRefreshFailed => EthDisconnectReason.DisconnectRequested, DisconnectReason.ForwardSyncFailed => EthDisconnectReason.DisconnectRequested,