diff --git a/p2p/protocol/circuitv1/relay/relay.go b/p2p/protocol/circuitv1/relay/relay.go index 1110261716..1461dda300 100644 --- a/p2p/protocol/circuitv1/relay/relay.go +++ b/p2p/protocol/circuitv1/relay/relay.go @@ -29,8 +29,8 @@ const ( ConnectTimeout = 30 * time.Second HandshakeTimeout = time.Minute - RelayHopTag = "relay-v1-hop" - RelayHopTagValue = 2 + relayHopTag = "relay-v1-hop" + relayHopTagValue = 2 maxMessageSize = 4096 ) @@ -270,7 +270,7 @@ func (r *Relay) addConn(p peer.ID) { conns++ r.conns[p] = conns if conns == 1 { - r.host.ConnManager().TagPeer(p, RelayHopTag, RelayHopTagValue) + r.host.ConnManager().TagPeer(p, relayHopTag, relayHopTagValue) } } @@ -281,7 +281,7 @@ func (r *Relay) rmConn(p peer.ID) { r.conns[p] = conns } else { delete(r.conns, p) - r.host.ConnManager().UntagPeer(p, RelayHopTag) + r.host.ConnManager().UntagPeer(p, relayHopTag) } } diff --git a/p2p/protocol/circuitv2/relay/relay.go b/p2p/protocol/circuitv2/relay/relay.go index a50c32fd98..d4e08d5169 100644 --- a/p2p/protocol/circuitv2/relay/relay.go +++ b/p2p/protocol/circuitv2/relay/relay.go @@ -30,8 +30,8 @@ const ( ConnectTimeout = 30 * time.Second HandshakeTimeout = time.Minute - RelayHopTag = "relay-v2-hop" - RelayHopTagValue = 2 + relayHopTag = "relay-v2-hop" + relayHopTagValue = 2 maxMessageSize = 4096 ) @@ -347,7 +347,7 @@ func (r *Relay) addConn(p peer.ID) { conns++ r.conns[p] = conns if conns == 1 { - r.host.ConnManager().TagPeer(p, RelayHopTag, RelayHopTagValue) + r.host.ConnManager().TagPeer(p, relayHopTag, relayHopTagValue) } } @@ -358,7 +358,7 @@ func (r *Relay) rmConn(p peer.ID) { r.conns[p] = conns } else { delete(r.conns, p) - r.host.ConnManager().UntagPeer(p, RelayHopTag) + r.host.ConnManager().UntagPeer(p, relayHopTag) } }