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 cp-wjhan committed Jun 30, 2023
1 parent 48c1a4d commit 9fdb435
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/utils/flags.go
Expand Up @@ -1193,8 +1193,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 9fdb435

Please sign in to comment.