Skip to content

Commit

Permalink
fix: protocol name for eth68
Browse files Browse the repository at this point in the history
  • Loading branch information
egonspace committed Jul 24, 2024
1 parent 1f76998 commit 2d6020b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eth/protocols/eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions eth/protocols/eth/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 2d6020b

Please sign in to comment.