mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/network: suggest peers that are closer to us
This commit is contained in:
parent
4f0b2d6113
commit
143edf6715
1 changed files with 1 additions and 1 deletions
|
|
@ -161,7 +161,7 @@ func (d *Peer) handleSubPeersMsg(msg *subPeersMsg) error {
|
|||
d.setDepth(msg.Depth)
|
||||
var peers []*BzzAddr
|
||||
d.kad.EachConn(d.Over(), 255, func(p *Peer, po int) bool {
|
||||
if pob, _ := Pof(d, d.kad.BaseAddr(), 0); pob > po {
|
||||
if uint8(po) < msg.Depth {
|
||||
return false
|
||||
}
|
||||
if !d.seen(p.BzzAddr) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue