cmd: prevent accidental invalid commands (#17248)

* cmd: stop parsing bootnodes if one is invalid

* cmd/geth: require valid command as argument (or no arg)
This commit is contained in:
a e r t h
2018-07-26 03:57:20 -07:00
committed by Péter Szilágyi
parent feed8069a6
commit 021d6fbbbb
2 changed files with 4 additions and 2 deletions

View File

@ -644,8 +644,7 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
for _, url := range urls {
node, err := discover.ParseNode(url)
if err != nil {
log.Error("Bootstrap URL invalid", "enode", url, "err", err)
continue
log.Crit("Bootstrap URL invalid", "enode", url, "err", err)
}
cfg.BootstrapNodes = append(cfg.BootstrapNodes, node)
}