aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/network/discovery.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/network/discovery.go')
-rw-r--r--swarm/network/discovery.go4
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) {