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 sadoci committed Jul 7, 2023
1 parent e9c8aef commit 27a88ea
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 @@ -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 27a88ea

Please sign in to comment.