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 jagdeep sidhu committed Jul 4, 2022
1 parent f2ef80a commit 31544fb
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 @@ -1106,8 +1106,11 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
urls = params.TanenbaumBootnodes
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 31544fb

Please sign in to comment.