mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p/discover: simplify
This commit is contained in:
parent
ba833c1fde
commit
d39ef3c8f4
1 changed files with 2 additions and 3 deletions
|
|
@ -862,10 +862,9 @@ func (t *UDPv5) collectTableNodes(rip net.IP, distances []uint, limit int) []*en
|
|||
}
|
||||
processed[dist] = struct{}{}
|
||||
|
||||
bn = t.tab.appendLiveNodes(dist, bn[:0])
|
||||
for _, n := range bn {
|
||||
for _, n := range t.tab.appendLiveNodes(dist, bn[:0]) {
|
||||
// Apply some pre-checks to avoid sending invalid nodes.
|
||||
// Note liveness is checked by appendBucketNodes.
|
||||
// Note liveness is checked by appendLiveNodes.
|
||||
if netutil.CheckRelayIP(rip, n.IP()) != nil {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue