diff --git a/eth/protocols/eth/handler.go b/eth/protocols/eth/handler.go index 293ec623c2..e2af97a541 100644 --- a/eth/protocols/eth/handler.go +++ b/eth/protocols/eth/handler.go @@ -103,7 +103,7 @@ func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2 version := version // Closure protocols[i] = p2p.Protocol{ - Name: ProtocolName, + Name: c_ProtocolName, Version: version, Length: protocolLengths[version], Run: func(p *p2p.Peer, rw p2p.MsgReadWriter) error { @@ -223,7 +223,7 @@ func handleMessage(backend Backend, peer *Peer) error { } // Track the amount of time it takes to serve the request and run the handler if metrics.Enabled { - h := fmt.Sprintf("%s/%s/%d/%#02x", p2p.HandleHistName, ProtocolName, peer.Version(), msg.Code) + h := fmt.Sprintf("%s/%s/%d/%#02x", p2p.HandleHistName, c_ProtocolName, peer.Version(), msg.Code) defer func(start time.Time) { sampler := func() metrics.Sample { return metrics.ResettingSample( diff --git a/eth/protocols/eth/protocol.go b/eth/protocols/eth/protocol.go index 9341d43a1f..7d0085a3fb 100644 --- a/eth/protocols/eth/protocol.go +++ b/eth/protocols/eth/protocol.go @@ -33,9 +33,9 @@ const ( ETH66 = 66 ) -// ProtocolName is the official short name of the `eth` protocol used during +// ProtocolName is the official short name of the `quai` protocol used during // devp2p capability negotiation. -const ProtocolName = "eth" +const c_ProtocolName = "quai" // ProtocolVersions are the supported versions of the `eth` protocol (first // is primary). diff --git a/eth/protocols/eth/tracker.go b/eth/protocols/eth/tracker.go index 751d9396fa..195b92691b 100644 --- a/eth/protocols/eth/tracker.go +++ b/eth/protocols/eth/tracker.go @@ -23,4 +23,4 @@ import ( ) // requestTracker is a singleton tracker for eth/66 and newer request times. -var requestTracker = tracker.New(ProtocolName, 5*time.Minute) +var requestTracker = tracker.New(c_ProtocolName, 5*time.Minute)