mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "p2p/discover: filter bootnodes by netrestrict (#27701)"
This reverts commit 95e09f6603.
This commit is contained in:
parent
7f610edfe2
commit
a90e78cecc
1 changed files with 1 additions and 7 deletions
|
|
@ -203,18 +203,12 @@ func (tab *Table) close() {
|
||||||
// are used to connect to the network if the table is empty and there
|
// are used to connect to the network if the table is empty and there
|
||||||
// are no known nodes in the database.
|
// are no known nodes in the database.
|
||||||
func (tab *Table) setFallbackNodes(nodes []*enode.Node) error {
|
func (tab *Table) setFallbackNodes(nodes []*enode.Node) error {
|
||||||
nursery := make([]*node, 0, len(nodes))
|
|
||||||
for _, n := range nodes {
|
for _, n := range nodes {
|
||||||
if err := n.ValidateComplete(); err != nil {
|
if err := n.ValidateComplete(); err != nil {
|
||||||
return fmt.Errorf("bad bootstrap node %q: %v", n, err)
|
return fmt.Errorf("bad bootstrap node %q: %v", n, err)
|
||||||
}
|
}
|
||||||
if tab.cfg.NetRestrict != nil && !tab.cfg.NetRestrict.Contains(n.IP()) {
|
|
||||||
tab.log.Error("Bootstrap node filtered by netrestrict", "id", n.ID(), "ip", n.IP())
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
nursery = append(nursery, wrapNode(n))
|
|
||||||
}
|
}
|
||||||
tab.nursery = nursery
|
tab.nursery = wrapNodes(nodes)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue