Skip to content

Commit

Permalink
Send UselessPeer on invalid network id (#7899)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchhill authored Dec 13, 2024
1 parent acb92bd commit 7f32990
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7f32990

Please sign in to comment.