From 2d6020bedd18e3fbbe0fe3ef69716bbce6425eaf Mon Sep 17 00:00:00 2001 From: egonspace Date: Wed, 24 Jul 2024 09:12:14 +0900 Subject: [PATCH] fix: protocol name for eth68 --- eth/protocols/eth/handler.go | 6 +++++- eth/protocols/eth/protocol.go | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/eth/protocols/eth/handler.go b/eth/protocols/eth/handler.go index 73fd3d044375..b7f81ba70a22 100644 --- a/eth/protocols/eth/handler.go +++ b/eth/protocols/eth/handler.go @@ -102,8 +102,12 @@ func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2 for i, version := range ProtocolVersions { version := version // Closure + protocolName := ProtocolName + if version == ETH68 { + protocolName = Protocol68Name + } protocols[i] = p2p.Protocol{ - Name: ProtocolName, + Name: protocolName, Version: version, Length: protocolLengths[version], Run: func(p *p2p.Peer, rw p2p.MsgReadWriter) error { diff --git a/eth/protocols/eth/protocol.go b/eth/protocols/eth/protocol.go index aac1d505b3c1..7ff646dd2446 100644 --- a/eth/protocols/eth/protocol.go +++ b/eth/protocols/eth/protocol.go @@ -39,6 +39,7 @@ const ( // ProtocolName is the official short name of the `eth` protocol used during // devp2p capability negotiation. const ProtocolName = "mir" +const Protocol68Name = "eth" // ProtocolVersions are the supported versions of the `eth` protocol (first // is primary).