cmd/utils: allow empty bootnodes flag override (#18509)

This commit is contained in:
Anton Evangelatov 2019-01-24 13:02:30 +01:00 committed by Felix Lange
parent ad13d2d407
commit 0a454554ae

View File

@ -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