|
|
|
@ -595,17 +595,7 @@ var ( |
|
|
|
|
} |
|
|
|
|
BootnodesFlag = cli.StringFlag{ |
|
|
|
|
Name: "bootnodes", |
|
|
|
|
Usage: "Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers)", |
|
|
|
|
Value: "", |
|
|
|
|
} |
|
|
|
|
BootnodesV4Flag = cli.StringFlag{ |
|
|
|
|
Name: "bootnodesv4", |
|
|
|
|
Usage: "Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes)", |
|
|
|
|
Value: "", |
|
|
|
|
} |
|
|
|
|
BootnodesV5Flag = cli.StringFlag{ |
|
|
|
|
Name: "bootnodesv5", |
|
|
|
|
Usage: "Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes)", |
|
|
|
|
Usage: "Comma separated enode URLs for P2P discovery bootstrap", |
|
|
|
|
Value: "", |
|
|
|
|
} |
|
|
|
|
NodeKeyFileFlag = cli.StringFlag{ |
|
|
|
@ -793,9 +783,9 @@ func setNodeUserIdent(ctx *cli.Context, cfg *node.Config) { |
|
|
|
|
func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) { |
|
|
|
|
urls := params.MainnetBootnodes |
|
|
|
|
switch { |
|
|
|
|
case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(BootnodesV4Flag.Name): |
|
|
|
|
if ctx.GlobalIsSet(BootnodesV4Flag.Name) { |
|
|
|
|
urls = splitAndTrim(ctx.GlobalString(BootnodesV4Flag.Name)) |
|
|
|
|
case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(LegacyBootnodesV4Flag.Name): |
|
|
|
|
if ctx.GlobalIsSet(LegacyBootnodesV4Flag.Name) { |
|
|
|
|
urls = splitAndTrim(ctx.GlobalString(LegacyBootnodesV4Flag.Name)) |
|
|
|
|
} else { |
|
|
|
|
urls = splitAndTrim(ctx.GlobalString(BootnodesFlag.Name)) |
|
|
|
|
} |
|
|
|
@ -825,14 +815,16 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) { |
|
|
|
|
// 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.DiscoveryV5Bootnodes |
|
|
|
|
urls := params.MainnetBootnodes |
|
|
|
|
switch { |
|
|
|
|
case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(BootnodesV5Flag.Name): |
|
|
|
|
if ctx.GlobalIsSet(BootnodesV5Flag.Name) { |
|
|
|
|
urls = splitAndTrim(ctx.GlobalString(BootnodesV5Flag.Name)) |
|
|
|
|
case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(LegacyBootnodesV5Flag.Name): |
|
|
|
|
if ctx.GlobalIsSet(LegacyBootnodesV5Flag.Name) { |
|
|
|
|
urls = splitAndTrim(ctx.GlobalString(LegacyBootnodesV5Flag.Name)) |
|
|
|
|
} else { |
|
|
|
|
urls = splitAndTrim(ctx.GlobalString(BootnodesFlag.Name)) |
|
|
|
|
} |
|
|
|
|
case ctx.GlobalBool(RopstenFlag.Name): |
|
|
|
|
urls = params.RopstenBootnodes |
|
|
|
|
case ctx.GlobalBool(RinkebyFlag.Name): |
|
|
|
|
urls = params.RinkebyBootnodes |
|
|
|
|
case ctx.GlobalBool(GoerliFlag.Name): |
|
|
|
|