aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index b648f958b..e00f92fa7 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -773,6 +773,7 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
node, err := enode.ParseV4(url)
if err != nil {
log.Crit("Bootstrap URL invalid", "enode", url, "err", err)
+ continue
}
cfg.BootstrapNodes = append(cfg.BootstrapNodes, node)
}
@@ -800,12 +801,14 @@ func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) {
cfg.BootstrapNodesV5 = make([]*discv5.Node, 0, len(urls))
for _, url := range urls {
- node, err := discv5.ParseNode(url)
- if err != nil {
- log.Error("Bootstrap URL invalid", "enode", url, "err", err)
- continue
+ if url != "" {
+ node, err := discv5.ParseNode(url)
+ if err != nil {
+ log.Error("Bootstrap URL invalid", "enode", url, "err", err)
+ continue
+ }
+ cfg.BootstrapNodesV5 = append(cfg.BootstrapNodesV5, node)
}
- cfg.BootstrapNodesV5 = append(cfg.BootstrapNodesV5, node)
}
}