From f2e09d34feb3d157bc204952d41b45947b0a1375 Mon Sep 17 00:00:00 2001 From: egonspace Date: Mon, 3 Jun 2024 14:13:30 +0900 Subject: [PATCH] fix: adjust boot node count --- cmd/utils/flags.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 96e8cd654c53..6786ac702d82 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1041,6 +1041,9 @@ func setRandomBootstrapNodes(ctx *cli.Context, bootnodes []string) []string { } // select random bootnodes selectcount := params.BootnodeCount + if selectcount > bootnodeslen { + selectcount = bootnodeslen + } urls := make([]string, selectcount) tempnode := make([]string, bootnodeslen) copy(tempnode, bootnodes)