Skip to content

Commit

Permalink
feature: add opBNB V5 bootnodes (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
redhdx authored May 6, 2024
1 parent d46af07 commit 536ac5d
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit 536ac5d

Please sign in to comment.