From 0a454554ae8e81643bcad7f41721e61f700e1a03 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Thu, 24 Jan 2019 13:02:30 +0100 Subject: [PATCH] cmd/utils: allow empty bootnodes flag override (#18509) --- cmd/utils/flags.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index a80cdd6cd..07e40e131 100644 --- a/cmd/utils/flags.go +++ b/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) } }