avoid using debug logging in gossip, just because
This commit is contained in:
parent
0c331d5200
commit
52628d1a2e
|
@ -660,7 +660,7 @@ func `/`(a, b: Duration): float64 =
|
||||||
|
|
||||||
proc colocationFactor(g: GossipSub, peer: PubSubPeer): float64 =
|
proc colocationFactor(g: GossipSub, peer: PubSubPeer): float64 =
|
||||||
if peer.connections.len == 0:
|
if peer.connections.len == 0:
|
||||||
debug "colocationFactor, no connections", peer
|
trace "colocationFactor, no connections", peer
|
||||||
0.0
|
0.0
|
||||||
else:
|
else:
|
||||||
let
|
let
|
||||||
|
@ -668,7 +668,7 @@ proc colocationFactor(g: GossipSub, peer: PubSubPeer): float64 =
|
||||||
ipPeers = g.peersInIP.getOrDefault(address)
|
ipPeers = g.peersInIP.getOrDefault(address)
|
||||||
len = ipPeers.len.float64
|
len = ipPeers.len.float64
|
||||||
if len > g.parameters.ipColocationFactorThreshold:
|
if len > g.parameters.ipColocationFactorThreshold:
|
||||||
debug "colocationFactor over threshold", peer, address, len
|
trace "colocationFactor over threshold", peer, address, len
|
||||||
let over = len - g.parameters.ipColocationFactorThreshold
|
let over = len - g.parameters.ipColocationFactorThreshold
|
||||||
over * over
|
over * over
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue