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 7, 2022
1 parent 3a47244 commit ab45f1e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
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 ab45f1e

Please sign in to comment.