mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p/discover: rename to appendLiveNodes
This commit is contained in:
parent
0d46156af4
commit
b5acff0fad
2 changed files with 3 additions and 2 deletions
|
|
@ -459,7 +459,8 @@ func (tab *Table) findnodeByID(target enode.ID, nresults int, preferLive bool) *
|
|||
return nodes
|
||||
}
|
||||
|
||||
func (tab *Table) appendBucketNodes(dist uint, result []*enode.Node) []*enode.Node {
|
||||
// appendLiveNodes adds nodes at the given distance to the result slice.
|
||||
func (tab *Table) appendLiveNodes(dist uint, result []*enode.Node) []*enode.Node {
|
||||
if dist > 256 {
|
||||
return result
|
||||
}
|
||||
|
|
|
|||
|
|
@ -861,7 +861,7 @@ func (t *UDPv5) collectTableNodes(rip net.IP, distances []uint, limit int) []*en
|
|||
continue
|
||||
}
|
||||
|
||||
bn = t.tab.appendBucketNodes(dist, bn[:0])
|
||||
bn = t.tab.appendLiveNodes(dist, bn[:0])
|
||||
for _, n := range bn {
|
||||
// Apply some pre-checks to avoid sending invalid nodes.
|
||||
// Note liveness is checked by appendBucketNodes.
|
||||
|
|
|
|||
Loading…
Reference in a new issue