mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
added more warn logs for all deprecated flags for consistency
This commit is contained in:
parent
da47992bf1
commit
422f8fdeba
3 changed files with 21 additions and 5 deletions
|
|
@ -20,6 +20,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
|
"math/big"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
godebug "runtime/debug"
|
godebug "runtime/debug"
|
||||||
|
|
@ -457,13 +458,21 @@ func startNode(ctx *cli.Context, stack *node.Node) {
|
||||||
utils.Fatalf("Ethereum service not running: %v", err)
|
utils.Fatalf("Ethereum service not running: %v", err)
|
||||||
}
|
}
|
||||||
// Set the gas price to the limits from the CLI and start mining
|
// Set the gas price to the limits from the CLI and start mining
|
||||||
gasprice := utils.GlobalBig(ctx, utils.MinerLegacyGasPriceFlag.Name)
|
var gasprice *big.Int
|
||||||
if ctx.IsSet(utils.MinerGasPriceFlag.Name) {
|
if ctx.IsSet(utils.MinerLegacyGasPriceFlag.Name) {
|
||||||
gasprice = utils.GlobalBig(ctx, utils.MinerGasPriceFlag.Name)
|
gasprice = utils.GlobalBig(ctx, utils.MinerLegacyGasPriceFlag.Name)
|
||||||
|
log.Warn("The flag --gasprice is deprecated and will be removed in the future, please use --miner.gasprice")
|
||||||
}
|
}
|
||||||
|
gasprice = utils.GlobalBig(ctx, utils.MinerGasPriceFlag.Name)
|
||||||
ethereum.TxPool().SetGasPrice(gasprice)
|
ethereum.TxPool().SetGasPrice(gasprice)
|
||||||
|
|
||||||
threads := ctx.GlobalInt(utils.MinerLegacyThreadsFlag.Name)
|
var threads int
|
||||||
|
if ctx.GlobalIsSet(utils.MinerLegacyThreadsFlag.Name) {
|
||||||
|
threads = ctx.GlobalInt(utils.MinerLegacyThreadsFlag.Name)
|
||||||
|
log.Warn("The flag --minerthreads is deprecated and will be removed in the future, please use --miner.threads")
|
||||||
|
}
|
||||||
|
threads = ctx.GlobalInt(utils.MinerThreadsFlag.Name)
|
||||||
|
|
||||||
if ctx.GlobalIsSet(utils.MinerThreadsFlag.Name) {
|
if ctx.GlobalIsSet(utils.MinerThreadsFlag.Name) {
|
||||||
threads = ctx.GlobalInt(utils.MinerThreadsFlag.Name)
|
threads = ctx.GlobalInt(utils.MinerThreadsFlag.Name)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ var AppHelpFlagGroups = []flagGroup{
|
||||||
Flags: whisperFlags,
|
Flags: whisperFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ALIASED OPTIONS (deprecated)",
|
Name: "ALIASED (deprecated)",
|
||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
utils.LegacyTestnetFlag,
|
utils.LegacyTestnetFlag,
|
||||||
utils.LightLegacyServFlag,
|
utils.LightLegacyServFlag,
|
||||||
|
|
|
||||||
|
|
@ -1102,6 +1102,7 @@ func setIPC(ctx *cli.Context, cfg *node.Config) {
|
||||||
func setLes(ctx *cli.Context, cfg *eth.Config) {
|
func setLes(ctx *cli.Context, cfg *eth.Config) {
|
||||||
if ctx.GlobalIsSet(LightLegacyServFlag.Name) {
|
if ctx.GlobalIsSet(LightLegacyServFlag.Name) {
|
||||||
cfg.LightServ = ctx.GlobalInt(LightLegacyServFlag.Name)
|
cfg.LightServ = ctx.GlobalInt(LightLegacyServFlag.Name)
|
||||||
|
log.Warn("The flag --lightserv is deprecated and will be removed in the future, please use --light.serve")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(LightServeFlag.Name) {
|
if ctx.GlobalIsSet(LightServeFlag.Name) {
|
||||||
cfg.LightServ = ctx.GlobalInt(LightServeFlag.Name)
|
cfg.LightServ = ctx.GlobalInt(LightServeFlag.Name)
|
||||||
|
|
@ -1114,6 +1115,7 @@ func setLes(ctx *cli.Context, cfg *eth.Config) {
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(LightLegacyPeersFlag.Name) {
|
if ctx.GlobalIsSet(LightLegacyPeersFlag.Name) {
|
||||||
cfg.LightPeers = ctx.GlobalInt(LightLegacyPeersFlag.Name)
|
cfg.LightPeers = ctx.GlobalInt(LightLegacyPeersFlag.Name)
|
||||||
|
log.Warn("The flag --lightpeers is deprecated and will be removed in the future, please use --light.maxpeers")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(LightMaxPeersFlag.Name) {
|
if ctx.GlobalIsSet(LightMaxPeersFlag.Name) {
|
||||||
cfg.LightPeers = ctx.GlobalInt(LightMaxPeersFlag.Name)
|
cfg.LightPeers = ctx.GlobalInt(LightMaxPeersFlag.Name)
|
||||||
|
|
@ -1179,6 +1181,8 @@ func setEtherbase(ctx *cli.Context, ks *keystore.KeyStore, cfg *eth.Config) {
|
||||||
var etherbase string
|
var etherbase string
|
||||||
if ctx.GlobalIsSet(MinerLegacyEtherbaseFlag.Name) {
|
if ctx.GlobalIsSet(MinerLegacyEtherbaseFlag.Name) {
|
||||||
etherbase = ctx.GlobalString(MinerLegacyEtherbaseFlag.Name)
|
etherbase = ctx.GlobalString(MinerLegacyEtherbaseFlag.Name)
|
||||||
|
log.Warn("The flag --etherbase is deprecated and will be removed in the future, please use --miner.etherbase")
|
||||||
|
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(MinerEtherbaseFlag.Name) {
|
if ctx.GlobalIsSet(MinerEtherbaseFlag.Name) {
|
||||||
etherbase = ctx.GlobalString(MinerEtherbaseFlag.Name)
|
etherbase = ctx.GlobalString(MinerEtherbaseFlag.Name)
|
||||||
|
|
@ -1456,12 +1460,14 @@ func setMiner(ctx *cli.Context, cfg *miner.Config) {
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(MinerLegacyExtraDataFlag.Name) {
|
if ctx.GlobalIsSet(MinerLegacyExtraDataFlag.Name) {
|
||||||
cfg.ExtraData = []byte(ctx.GlobalString(MinerLegacyExtraDataFlag.Name))
|
cfg.ExtraData = []byte(ctx.GlobalString(MinerLegacyExtraDataFlag.Name))
|
||||||
|
log.Warn("The flag --extradata is deprecated and will be removed in the future, please use --miner.extradata")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(MinerExtraDataFlag.Name) {
|
if ctx.GlobalIsSet(MinerExtraDataFlag.Name) {
|
||||||
cfg.ExtraData = []byte(ctx.GlobalString(MinerExtraDataFlag.Name))
|
cfg.ExtraData = []byte(ctx.GlobalString(MinerExtraDataFlag.Name))
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(MinerLegacyGasTargetFlag.Name) {
|
if ctx.GlobalIsSet(MinerLegacyGasTargetFlag.Name) {
|
||||||
cfg.GasFloor = ctx.GlobalUint64(MinerLegacyGasTargetFlag.Name)
|
cfg.GasFloor = ctx.GlobalUint64(MinerLegacyGasTargetFlag.Name)
|
||||||
|
log.Warn("The flag --targetgaslimit is deprecated and will be removed in the future, please use --miner.gastarget")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(MinerGasTargetFlag.Name) {
|
if ctx.GlobalIsSet(MinerGasTargetFlag.Name) {
|
||||||
cfg.GasFloor = ctx.GlobalUint64(MinerGasTargetFlag.Name)
|
cfg.GasFloor = ctx.GlobalUint64(MinerGasTargetFlag.Name)
|
||||||
|
|
@ -1471,6 +1477,7 @@ func setMiner(ctx *cli.Context, cfg *miner.Config) {
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(MinerLegacyGasPriceFlag.Name) {
|
if ctx.GlobalIsSet(MinerLegacyGasPriceFlag.Name) {
|
||||||
cfg.GasPrice = GlobalBig(ctx, MinerLegacyGasPriceFlag.Name)
|
cfg.GasPrice = GlobalBig(ctx, MinerLegacyGasPriceFlag.Name)
|
||||||
|
log.Warn("The flag --gasprice is deprecated and will be removed in the future, please use --miner.gasprice")
|
||||||
}
|
}
|
||||||
if ctx.GlobalIsSet(MinerGasPriceFlag.Name) {
|
if ctx.GlobalIsSet(MinerGasPriceFlag.Name) {
|
||||||
cfg.GasPrice = GlobalBig(ctx, MinerGasPriceFlag.Name)
|
cfg.GasPrice = GlobalBig(ctx, MinerGasPriceFlag.Name)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue