Skip to content

Commit

Permalink
cmd/utils: allow empty bootnodes flag override (ethereum#18509)
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense authored and fjl committed Jan 24, 2019
1 parent ad13d2d commit 0a45455
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 0a45455

Please sign in to comment.