Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust boot node count #99

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

egonspace
Copy link
Collaborator

@egonspace egonspace commented Jun 3, 2024

Current master version fails to run on a testnet node because params.BootnodeCount is greater than actual boot nodes(WemixTestnetBootnodes = []string {"...", "..."} = 2).

panic error message:

panic: invalid argument to Intn

goroutine 1 [running]:
math/rand.(*Rand).Intn(0x1e78020?, 0xc0003e26f0?)
	math/rand/rand.go:168 +0x65
math/rand.Intn(...)
	math/rand/rand.go:337
github.com/ethereum/go-ethereum/cmd/utils.setRandomBootstrapNodes(0x5fa489?, {0x32e4fa0, 0x2, 0xc000abdb00?})
	github.com/ethereum/go-ethereum/cmd/utils/flags.go:1048 +0x225
github.com/ethereum/go-ethereum/cmd/utils.setBootstrapNodes(0xc01a08c00000c01?, 0xc0003d7138)

So I added a line of code to defense for this situation.

@egonspace egonspace merged commit fb8ee2c into wemixarchive:master Jun 3, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotfix master merge dev to master
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants