Skip to content

Commit

Permalink
cmd/utils: fix applying bootstrap nodes from config file (ethereum#25174
Browse files Browse the repository at this point in the history
)
  • Loading branch information
andrepatta authored and blakehhuynh committed Oct 3, 2022
1 parent 298a9b7 commit 071ec40
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/utils/flags.go
Expand Up @@ -1081,8 +1081,11 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
urls = params.GoerliBootnodes
case ctx.Bool(KilnFlag.Name):
urls = params.KilnBootnodes
case cfg.BootstrapNodes != nil:
return // already set, don't apply defaults.
}

// don't apply defaults if BootstrapNodes is already set
if cfg.BootstrapNodes != nil {
return
}

cfg.BootstrapNodes = make([]*enode.Node, 0, len(urls))
Expand Down

0 comments on commit 071ec40

Please sign in to comment.