fix badly merged code in gossipsub.colocationFactor

This commit is contained in:
Giovanni Petrantoni 2021-02-26 12:39:57 +09:00
parent eac6cd3dbf
commit c1d8317e3c
1 changed files with 0 additions and 4 deletions

View File

@ -47,10 +47,6 @@ proc colocationFactor(g: GossipSub, peer: PubSubPeer): float64 =
address = peer.sendConn.observedAddr
g.peersInIP.mgetOrPut(address, initHashSet[PubSubPeer]()).incl(peer)
if address notin g.peersInIP:
g.peersInIP[address] = initHashSet[PubSubPeer]()
g.peersInIP[address].incl(peer)
let
ipPeers = g.peersInIP[address]
len = ipPeers.len.float64