From ed3dd97863fade94eb2ce581be72d24ffea0d801 Mon Sep 17 00:00:00 2001 From: Fabio Barone Date: Thu, 10 Jan 2019 15:28:32 -0500 Subject: [PATCH] swarm/network/stream: refactor to kad.EachConn --- swarm/network/stream/stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swarm/network/stream/stream.go b/swarm/network/stream/stream.go index 48034d5e64..fb571c8566 100644 --- a/swarm/network/stream/stream.go +++ b/swarm/network/stream/stream.go @@ -515,7 +515,7 @@ func (r *Registry) requestPeerSubscriptions(kad *network.Kademlia, subs map[enod // request subscriptions for all nodes and bins // nil as base takes the node's base; we need to pass 255 as `EachConn` runs // from deepest bins backwards - kad.EachConn(nil, 255, func(p *network.Peer, po int, _ bool) bool { + kad.EachConn(nil, 255, func(p *network.Peer, po int) bool { //if the peer's bin is shallower than the kademlia depth, //only the peer's bin should be subscribed if po < kadDepth {