mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/geth: if running a known preset, log it for convenience
This commit is contained in:
parent
63deca674a
commit
799499b4f6
2 changed files with 16 additions and 5 deletions
|
|
@ -268,6 +268,22 @@ func prepare(ctx *cli.Context) {
|
||||||
ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(4096))
|
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 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) {
|
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)
|
log.Info("Dropping default light client cache", "provided", ctx.GlobalInt(utils.CacheFlag.Name), "updated", 128)
|
||||||
|
|
|
||||||
|
|
@ -1449,11 +1449,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
|
||||||
CheckExclusive(ctx, LightLegacyServFlag, LightServeFlag, SyncModeFlag, "light")
|
CheckExclusive(ctx, LightLegacyServFlag, LightServeFlag, SyncModeFlag, "light")
|
||||||
CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer
|
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
|
var ks *keystore.KeyStore
|
||||||
if keystores := stack.AccountManager().Backends(keystore.KeyStoreType); len(keystores) > 0 {
|
if keystores := stack.AccountManager().Backends(keystore.KeyStoreType); len(keystores) > 0 {
|
||||||
ks = keystores[0].(*keystore.KeyStore)
|
ks = keystores[0].(*keystore.KeyStore)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue