diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 0cfbdcd024..42da598716 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -268,6 +268,22 @@ func prepare(ctx *cli.Context) { ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(4096)) } } + // If we're running a known preset, log it for convenience. + if ctx.GlobalIsSet(utils.LegacyTestnetFlag.Name) { + log.Info("Starting Geth on Ropsten testnet...") + log.Warn("The --testnet flag is ambiguous! Please specify one of --goerli, --rinkeby, or --ropsten.") + log.Warn("The generic --testnet flag is deprecated and will be removed in the future!") + } else if ctx.GlobalIsSet(utils.RopstenFlag.Name) { + log.Info("Starting Geth on Ropsten testnet...") + } else if ctx.GlobalIsSet(utils.RinkebyFlag.Name) { + log.Info("Starting Geth on Rinkeby testnet...") + } else if ctx.GlobalIsSet(utils.GoerliFlag.Name) { + log.Info("Starting Geth on Görli testnet...") + } else if ctx.GlobalIsSet(utils.DeveloperFlag.Name) { + log.Info("Starting Geth in ephemeral dev mode...") + } else if !ctx.GlobalIsSet(utils.NetworkIdFlag.Name) { + log.Info("Starting Geth on Ethereum mainnet...") + } // If we're running a light client on any network, drop the cache to some meaningfully low amount if ctx.GlobalString(utils.SyncModeFlag.Name) == "light" && !ctx.GlobalIsSet(utils.CacheFlag.Name) { log.Info("Dropping default light client cache", "provided", ctx.GlobalInt(utils.CacheFlag.Name), "updated", 128) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index f5896a1783..3bb65a64ed 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1449,11 +1449,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) { CheckExclusive(ctx, LightLegacyServFlag, LightServeFlag, SyncModeFlag, "light") CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer - if ctx.GlobalIsSet(LegacyTestnetFlag.Name) { - log.Warn("The --testnet flag is ambiguous! Please specify one of --goerli, --rinkeby, or --ropsten.") - log.Warn("The generic --testnet flag is deprecated and will be removed in the future!") - } - var ks *keystore.KeyStore if keystores := stack.AccountManager().Backends(keystore.KeyStoreType); len(keystores) > 0 { ks = keystores[0].(*keystore.KeyStore)