From 8aadd95c5ace156813975e32efecf7629484297d Mon Sep 17 00:00:00 2001 From: Andre Patta Date: Wed, 29 Jun 2022 06:57:12 -0300 Subject: [PATCH] cmd/utils: fix applying bootstrap nodes from config file (#25174) --- cmd/utils/flags.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index ce116b574643..47637a9dd255 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -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))