diff options
author | Janos Guljas <janos@resenje.org> | 2018-09-25 22:57:31 +0800 |
---|---|---|
committer | Janos Guljas <janos@resenje.org> | 2018-09-25 22:57:31 +0800 |
commit | 24349144b6c0642755569268bab56b9033743212 (patch) | |
tree | 9d9d2b6659fd8a56512dfc807aafe4b733165ae1 /swarm/network/discovery.go | |
parent | 7d56602391e155e2ce9ba7c261300a1804ab9972 (diff) | |
parent | d3441ebb563439bac0837d70591f92e2c6080303 (diff) | |
download | go-tangerine-24349144b6c0642755569268bab56b9033743212.tar go-tangerine-24349144b6c0642755569268bab56b9033743212.tar.gz go-tangerine-24349144b6c0642755569268bab56b9033743212.tar.bz2 go-tangerine-24349144b6c0642755569268bab56b9033743212.tar.lz go-tangerine-24349144b6c0642755569268bab56b9033743212.tar.xz go-tangerine-24349144b6c0642755569268bab56b9033743212.tar.zst go-tangerine-24349144b6c0642755569268bab56b9033743212.zip |
Merge branch 'master' into max-stream-peer-servers
Diffstat (limited to 'swarm/network/discovery.go')
-rw-r--r-- | swarm/network/discovery.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/swarm/network/discovery.go b/swarm/network/discovery.go index 301959480..21703e70f 100644 --- a/swarm/network/discovery.go +++ b/swarm/network/discovery.go @@ -87,7 +87,7 @@ func NotifyPeer(p *BzzAddr, k *Kademlia) { // unless already notified during the connection session func (d *Peer) NotifyPeer(a *BzzAddr, po uint8) { // immediately return - if (po < d.getDepth() && pot.ProxCmp(d.localAddr, d, a) != 1) || d.seen(a) { + if (po < d.getDepth() && pot.ProxCmp(d.kad.BaseAddr(), d, a) != 1) || d.seen(a) { return } resp := &peersMsg{ @@ -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, isproxbin bool) bool { - if pob, _ := pof(d, d.localAddr, 0); pob > po { + if pob, _ := pof(d, d.kad.BaseAddr(), 0); pob > po { return false } if !d.seen(p.BzzAddr) { |