mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
swarm/network/stream: refactor to kad.EachConn
This commit is contained in:
parent
89d07e193c
commit
ed3dd97863
1 changed files with 1 additions and 1 deletions
|
|
@ -515,7 +515,7 @@ func (r *Registry) requestPeerSubscriptions(kad *network.Kademlia, subs map[enod
|
||||||
// request subscriptions for all nodes and bins
|
// request subscriptions for all nodes and bins
|
||||||
// nil as base takes the node's base; we need to pass 255 as `EachConn` runs
|
// nil as base takes the node's base; we need to pass 255 as `EachConn` runs
|
||||||
// from deepest bins backwards
|
// 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,
|
//if the peer's bin is shallower than the kademlia depth,
|
||||||
//only the peer's bin should be subscribed
|
//only the peer's bin should be subscribed
|
||||||
if po < kadDepth {
|
if po < kadDepth {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue