forked from cerc-io/plugeth
cmd/utils: allow empty bootnodes flag override (#18509)
This commit is contained in:
parent
ad13d2d407
commit
0a454554ae
@ -749,12 +749,14 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
|
||||
|
||||
cfg.BootstrapNodes = make([]*enode.Node, 0, len(urls))
|
||||
for _, url := range urls {
|
||||
if url != "" {
|
||||
node, err := enode.ParseV4(url)
|
||||
if err != nil {
|
||||
log.Crit("Bootstrap URL invalid", "enode", url, "err", err)
|
||||
}
|
||||
cfg.BootstrapNodes = append(cfg.BootstrapNodes, node)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// setBootstrapNodesV5 creates a list of bootstrap nodes from the command line
|
||||
|
Loading…
Reference in New Issue
Block a user