cmd, core, eth, miner: deprecate miner.gastarget flag (#23213)

This commit is contained in:
gary rong
2021-08-10 16:28:33 +08:00
committed by GitHub
parent 520f25688a
commit 6d175460df
13 changed files with 32 additions and 71 deletions

View File

@ -20,6 +20,7 @@ import (
"fmt"
"strings"
"github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/node"
"gopkg.in/urfave/cli.v1"
)
@ -33,7 +34,9 @@ var ShowDeprecated = cli.Command{
Description: "Show flags that have been deprecated and will soon be removed",
}
var DeprecatedFlags = []cli.Flag{}
var DeprecatedFlags = []cli.Flag{
LegacyMinerGasTargetFlag,
}
var (
// (Deprecated May 2020, shown in aliased flags section)
@ -66,6 +69,12 @@ var (
Usage: "API's offered over the HTTP-RPC interface (deprecated and will be removed June 2021, use --http.api)",
Value: "",
}
// (Deprecated July 2021, shown in aliased flags section)
LegacyMinerGasTargetFlag = cli.Uint64Flag{
Name: "miner.gastarget",
Usage: "Target gas floor for mined blocks (deprecated)",
Value: ethconfig.Defaults.Miner.GasFloor,
}
)
// showDeprecated displays deprecated flags that will be soon removed from the codebase.
@ -74,7 +83,8 @@ func showDeprecated(*cli.Context) {
fmt.Println("The following flags are deprecated and will be removed in the future!")
fmt.Println("--------------------------------------------------------------------")
fmt.Println()
// TODO remove when there are newly deprecated flags
fmt.Println("no deprecated flags to show at this time")
for _, flag := range DeprecatedFlags {
fmt.Println(flag.String())
}
fmt.Println()
}