merge swarm-network-rewrite

This commit is contained in:
Anton Evangelatov 2018-04-16 13:49:31 +03:00
commit b11804c2bc

View file

@ -263,14 +263,10 @@ func (k *Kademlia) SuggestPeer() (a OverlayAddr, o int, want bool) {
if po >= depth { if po >= depth {
return false return false
} }
ok := f(func(val pot.Val, _ int) bool { return f(func(val pot.Val, _ int) bool {
a = k.callable(val) a = k.callable(val)
return a == nil return a == nil
}) })
if !ok {
return false
}
return true
}) })
// found a candidate // found a candidate
if a != nil { if a != nil {