From faa8b7aab64dd15676368aecc7fa2f8d517993e5 Mon Sep 17 00:00:00 2001 From: redhdx Date: Mon, 6 May 2024 15:34:28 +0800 Subject: [PATCH] feature(op-geth): add opBNB mainnet V5 bootnodes --- cmd/utils/flags.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index ea4387bc5f..4c1b799daf 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -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)) @@ -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))