mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
fix kademlia lookup condition
This commit is contained in:
parent
4a7f5c9899
commit
38fc79129f
1 changed files with 1 additions and 1 deletions
|
|
@ -267,7 +267,7 @@ func (self *Kademlia) getNodes(target Address, max int) (r nodesByDistance) {
|
||||||
r.push(bucket[i], limit)
|
r.push(bucket[i], limit)
|
||||||
n++
|
n++
|
||||||
}
|
}
|
||||||
if max == 0 && start <= index && n > 0 ||
|
if max == 0 && start <= index && (n > 0 || start == 0) ||
|
||||||
max > 0 && down && start <= index && (n >= limit || n == self.Count() || start == 0) {
|
max > 0 && down && start <= index && (n >= limit || n == self.Count() || start == 0) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue