mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/utils: deprecated bootnodesv4/v5 flags
This commit is contained in:
parent
a81174c945
commit
63d9236f94
4 changed files with 21 additions and 21 deletions
|
|
@ -61,8 +61,8 @@ var (
|
||||||
utils.UnlockedAccountFlag,
|
utils.UnlockedAccountFlag,
|
||||||
utils.PasswordFileFlag,
|
utils.PasswordFileFlag,
|
||||||
utils.BootnodesFlag,
|
utils.BootnodesFlag,
|
||||||
utils.BootnodesV4Flag,
|
utils.LegacyBootnodesV4Flag,
|
||||||
utils.BootnodesV5Flag,
|
utils.LegacyBootnodesV5Flag,
|
||||||
utils.DataDirFlag,
|
utils.DataDirFlag,
|
||||||
utils.AncientFlag,
|
utils.AncientFlag,
|
||||||
utils.KeyStoreDirFlag,
|
utils.KeyStoreDirFlag,
|
||||||
|
|
|
||||||
|
|
@ -183,8 +183,8 @@ var AppHelpFlagGroups = []flagGroup{
|
||||||
Name: "NETWORKING",
|
Name: "NETWORKING",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
utils.BootnodesFlag,
|
utils.BootnodesFlag,
|
||||||
utils.BootnodesV4Flag,
|
utils.LegacyBootnodesV4Flag,
|
||||||
utils.BootnodesV5Flag,
|
utils.LegacyBootnodesV5Flag,
|
||||||
utils.DNSDiscoveryFlag,
|
utils.DNSDiscoveryFlag,
|
||||||
utils.ListenPortFlag,
|
utils.ListenPortFlag,
|
||||||
utils.MaxPeersFlag,
|
utils.MaxPeersFlag,
|
||||||
|
|
|
||||||
|
|
@ -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))
|
||||||
}
|
}
|
||||||
|
|
@ -827,9 +817,9 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
|
||||||
func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) {
|
func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) {
|
||||||
urls := params.MainnetBootnodes
|
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))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,16 @@ var (
|
||||||
Usage: "Suggested gas price is the given percentile of a set of recent transaction gas prices (deprecated, use --gpo.percentile)",
|
Usage: "Suggested gas price is the given percentile of a set of recent transaction gas prices (deprecated, use --gpo.percentile)",
|
||||||
Value: eth.DefaultConfig.GPO.Percentile,
|
Value: eth.DefaultConfig.GPO.Percentile,
|
||||||
}
|
}
|
||||||
|
LegacyBootnodesV4Flag = cli.StringFlag{
|
||||||
|
Name: "bootnodesv4",
|
||||||
|
Usage: "Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes) (deprecated, use --bootnodes)",
|
||||||
|
Value: "",
|
||||||
|
}
|
||||||
|
LegacyBootnodesV5Flag = cli.StringFlag{
|
||||||
|
Name: "bootnodesv5",
|
||||||
|
Usage: "Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes) (deprecated, use --bootnodes)",
|
||||||
|
Value: "",
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// showDeprecated displays deprecated flags that will be soon removed from the codebase.
|
// showDeprecated displays deprecated flags that will be soon removed from the codebase.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue