|
|
@ -595,17 +595,7 @@ var ( |
|
|
|
} |
|
|
|
} |
|
|
|
BootnodesFlag = cli.StringFlag{ |
|
|
|
BootnodesFlag = cli.StringFlag{ |
|
|
|
Name: "bootnodes", |
|
|
|
Name: "bootnodes", |
|
|
|
Usage: "Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers)", |
|
|
|
Usage: "Comma separated enode URLs for P2P discovery bootstrap", |
|
|
|
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)", |
|
|
|
|
|
|
|
Value: "", |
|
|
|
Value: "", |
|
|
|
} |
|
|
|
} |
|
|
|
NodeKeyFileFlag = cli.StringFlag{ |
|
|
|
NodeKeyFileFlag = cli.StringFlag{ |
|
|
@ -793,9 +783,9 @@ func setNodeUserIdent(ctx *cli.Context, cfg *node.Config) { |
|
|
|
func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) { |
|
|
|
func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) { |
|
|
|
urls := params.MainnetBootnodes |
|
|
|
urls := params.MainnetBootnodes |
|
|
|
switch { |
|
|
|
switch { |
|
|
|
case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(BootnodesV4Flag.Name): |
|
|
|
case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(LegacyBootnodesV4Flag.Name): |
|
|
|
if ctx.GlobalIsSet(BootnodesV4Flag.Name) { |
|
|
|
if ctx.GlobalIsSet(LegacyBootnodesV4Flag.Name) { |
|
|
|
urls = splitAndTrim(ctx.GlobalString(BootnodesV4Flag.Name)) |
|
|
|
urls = splitAndTrim(ctx.GlobalString(LegacyBootnodesV4Flag.Name)) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
urls = splitAndTrim(ctx.GlobalString(BootnodesFlag.Name)) |
|
|
|
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
|
|
|
|
// setBootstrapNodesV5 creates a list of bootstrap nodes from the command line
|
|
|
|
// flags, reverting to pre-configured ones if none have been specified.
|
|
|
|
// flags, reverting to pre-configured ones if none have been specified.
|
|
|
|
func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) { |
|
|
|
func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) { |
|
|
|
urls := params.DiscoveryV5Bootnodes |
|
|
|
urls := params.MainnetBootnodes |
|
|
|
switch { |
|
|
|
switch { |
|
|
|
case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(BootnodesV5Flag.Name): |
|
|
|
case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(LegacyBootnodesV5Flag.Name): |
|
|
|
if ctx.GlobalIsSet(BootnodesV5Flag.Name) { |
|
|
|
if ctx.GlobalIsSet(LegacyBootnodesV5Flag.Name) { |
|
|
|
urls = splitAndTrim(ctx.GlobalString(BootnodesV5Flag.Name)) |
|
|
|
urls = splitAndTrim(ctx.GlobalString(LegacyBootnodesV5Flag.Name)) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
urls = splitAndTrim(ctx.GlobalString(BootnodesFlag.Name)) |
|
|
|
urls = splitAndTrim(ctx.GlobalString(BootnodesFlag.Name)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
case ctx.GlobalBool(RopstenFlag.Name): |
|
|
|
|
|
|
|
urls = params.RopstenBootnodes |
|
|
|
case ctx.GlobalBool(RinkebyFlag.Name): |
|
|
|
case ctx.GlobalBool(RinkebyFlag.Name): |
|
|
|
urls = params.RinkebyBootnodes |
|
|
|
urls = params.RinkebyBootnodes |
|
|
|
case ctx.GlobalBool(GoerliFlag.Name): |
|
|
|
case ctx.GlobalBool(GoerliFlag.Name): |
|
|
|