From 23299022552b5cf1b72bfc78c2d66e984f6a9151 Mon Sep 17 00:00:00 2001 From: q9f <58883403+q9f@users.noreply.github.com> Date: Wed, 1 Apr 2020 18:13:41 +0200 Subject: [PATCH] cmd/geth: revert --testnet back to ropsten and mark as legacy --- cmd/geth/chaincmd.go | 2 -- cmd/geth/consolecmd.go | 4 ++-- cmd/geth/main.go | 4 ++-- cmd/geth/usage.go | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index 2022b7d3c9..0a1d2e9982 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -147,7 +147,6 @@ The export-preimages command export hash preimages to an RLP encoded stream`, utils.CacheFlag, utils.SyncModeFlag, utils.FakePoWFlag, - utils.TestnetFlag, utils.RopstenFlag, utils.RinkebyFlag, utils.GoerliFlag, @@ -196,7 +195,6 @@ Use "ethereum dump 0" to dump the genesis block.`, utils.DataDirFlag, utils.AncientFlag, utils.CacheFlag, - utils.TestnetFlag, utils.RopstenFlag, utils.RinkebyFlag, utils.GoerliFlag, diff --git a/cmd/geth/consolecmd.go b/cmd/geth/consolecmd.go index 48c99e5088..8b32dce7dc 100644 --- a/cmd/geth/consolecmd.go +++ b/cmd/geth/consolecmd.go @@ -123,11 +123,11 @@ func remoteConsole(ctx *cli.Context) error { path = ctx.GlobalString(utils.DataDirFlag.Name) } if path != "" { - if ctx.GlobalBool(utils.RopstenFlag.Name) { + if ctx.GlobalBool(utils.LegacyTestnetFlag.Name) || ctx.GlobalBool(utils.RopstenFlag.Name) { path = filepath.Join(path, "testnet") } else if ctx.GlobalBool(utils.RinkebyFlag.Name) { path = filepath.Join(path, "rinkeby") - } else if ctx.GlobalBool(utils.TestnetFlag.Name) || ctx.GlobalBool(utils.GoerliFlag.Name) { + } else if ctx.GlobalBool(utils.GoerliFlag.Name) { path = filepath.Join(path, "goerli") } } diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 66f89040a8..0cfbdcd024 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -138,7 +138,7 @@ var ( utils.DNSDiscoveryFlag, utils.DeveloperFlag, utils.DeveloperPeriodFlag, - utils.TestnetFlag, + utils.LegacyTestnetFlag, utils.RopstenFlag, utils.RinkebyFlag, utils.GoerliFlag, @@ -262,7 +262,7 @@ func prepare(ctx *cli.Context) { // If we're a full node on mainnet without --cache specified, bump default cache allowance if ctx.GlobalString(utils.SyncModeFlag.Name) != "light" && !ctx.GlobalIsSet(utils.CacheFlag.Name) && !ctx.GlobalIsSet(utils.NetworkIdFlag.Name) { // Make sure we're not on any supported preconfigured testnet either - if !ctx.GlobalIsSet(utils.TestnetFlag.Name) && !ctx.GlobalIsSet(utils.RopstenFlag.Name) && !ctx.GlobalIsSet(utils.RinkebyFlag.Name) && !ctx.GlobalIsSet(utils.GoerliFlag.Name) && !ctx.GlobalIsSet(utils.DeveloperFlag.Name) { + if !ctx.GlobalIsSet(utils.LegacyTestnetFlag.Name) && !ctx.GlobalIsSet(utils.RopstenFlag.Name) && !ctx.GlobalIsSet(utils.RinkebyFlag.Name) && !ctx.GlobalIsSet(utils.GoerliFlag.Name) && !ctx.GlobalIsSet(utils.DeveloperFlag.Name) { // Nope, we're really on mainnet. Bump that cache up! log.Info("Bumping default cache on mainnet", "provided", ctx.GlobalInt(utils.CacheFlag.Name), "updated", 4096) ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(4096)) diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index 5f6dcc7f67..144415968a 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -72,7 +72,6 @@ var AppHelpFlagGroups = []flagGroup{ utils.NoUSBFlag, utils.SmartCardDaemonPathFlag, utils.NetworkIdFlag, - utils.TestnetFlag, utils.RopstenFlag, utils.RinkebyFlag, utils.GoerliFlag, @@ -246,6 +245,7 @@ var AppHelpFlagGroups = []flagGroup{ { Name: "DEPRECATED", Flags: []cli.Flag{ + utils.LegacyTestnetFlag, utils.LightLegacyServFlag, utils.LightLegacyPeersFlag, utils.MinerLegacyThreadsFlag,