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

feature: add opBNB V5 bootnodes #104

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ func mustParseBootnodes(urls []string) []*enode.Node {
// setBootstrapNodesV5 creates a list of bootstrap nodes from the command line
// flags, reverting to pre-configured ones if none have been specified.
func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) {
urls := params.V5Bootnodes
urls := params.OpBNBMainnetBootnodes
switch {
case ctx.IsSet(BootnodesFlag.Name):
urls = SplitAndTrim(ctx.String(BootnodesFlag.Name))
Expand All @@ -1199,6 +1199,12 @@ func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) {
} else {
urls = append(urls, params.OPSepoliaBootnodes...)
}
case ctx.Bool(OpBNBTestnetFlag.Name):
urls = params.OpBNBTestnetBootnodes
case ctx.Bool(NetworkIdFlag.Name):
if ctx.Uint64(NetworkIdFlag.Name) == params.OpBNBTestnet {
urls = params.OpBNBTestnetBootnodes
}
}

cfg.BootstrapNodesV5 = make([]*enode.Node, 0, len(urls))
Expand Down
Loading