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

pull/17980/head
Anton Evangelatov 6 years ago committed by Felix Lange
parent ad13d2d407
commit 0a454554ae
  1. 10
      cmd/utils/flags.go

@ -749,11 +749,13 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
cfg.BootstrapNodes = make([]*enode.Node, 0, len(urls))
for _, url := range urls {
node, err := enode.ParseV4(url)
if err != nil {
log.Crit("Bootstrap URL invalid", "enode", url, "err", err)
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)
}
cfg.BootstrapNodes = append(cfg.BootstrapNodes, node)
}
}

Loading…
Cancel
Save