From 5bf83077199512a10c34c245a46cd5ca138abee0 Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 14 Dec 2018 17:18:30 +0100 Subject: [PATCH] swarm/network: Too many n's --- swarm/network/kademlia.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarm/network/kademlia.go b/swarm/network/kademlia.go index 408dedcf0f..2a3ddc4968 100644 --- a/swarm/network/kademlia.go +++ b/swarm/network/kademlia.go @@ -676,7 +676,7 @@ func (k *Kademlia) saturation() int { // are found among the peers known to the kademlia // It is used in Healthy function for testing only // TODO move to separate testing tools file -func (o *PeerPot) knownNeighbours() (got bool, n int, missing [][]byte) { +func (o *PeerPot) knowNeighbours() (got bool, n int, missing [][]byte) { pm := make(map[string]bool) // create a map with all peers at depth and deeper known in the kademlia @@ -766,7 +766,7 @@ func (o *PeerPot) Healthy() *Health { o.Kademlia.lock.RLock() defer o.Kademlia.lock.RUnlock() gotnn, countgotnn, culpritsgotnn := o.connectedNeighbours() - knownn, countknownn, culpritsknownn := o.knownNeighbours() + knownn, countknownn, culpritsknownn := o.knowNeighbours() depth := depthForPot(o.conns, o.MinProxBinSize, o.base) saturated := o.saturation() < depth log.Trace(fmt.Sprintf("%08x: healthy: knowNNs: %v, gotNNs: %v, saturated: %v\n", o.base, knownn, gotnn, saturated))