Skip to content

Commit

Permalink
bugfix: updated the protocolName to quai in eth/protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
gameofpointers committed Feb 24, 2023
1 parent e931c2b commit ca9bf14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions eth/protocols/eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions eth/protocols/eth/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion eth/protocols/eth/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit ca9bf14

Please sign in to comment.