aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/utils')
-rw-r--r--cmd/utils/flags.go27
1 files changed, 16 insertions, 11 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 13430ad56..495bfe13e 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -329,12 +329,17 @@ var (
MinerGasTargetFlag = cli.Uint64Flag{
Name: "miner.gastarget",
Usage: "Target gas floor for mined blocks",
- Value: params.GenesisGasLimit,
+ Value: eth.DefaultConfig.MinerGasFloor,
}
MinerLegacyGasTargetFlag = cli.Uint64Flag{
Name: "targetgaslimit",
Usage: "Target gas floor for mined blocks (deprecated, use --miner.gastarget)",
- Value: params.GenesisGasLimit,
+ Value: eth.DefaultConfig.MinerGasFloor,
+ }
+ MinerGasLimitFlag = cli.Uint64Flag{
+ Name: "miner.gaslimit",
+ Usage: "Target gas ceiling for mined blocks",
+ Value: eth.DefaultConfig.MinerGasCeil,
}
MinerGasPriceFlag = BigFlag{
Name: "miner.gasprice",
@@ -1146,6 +1151,15 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
if ctx.GlobalIsSet(MinerExtraDataFlag.Name) {
cfg.MinerExtraData = []byte(ctx.GlobalString(MinerExtraDataFlag.Name))
}
+ if ctx.GlobalIsSet(MinerLegacyGasTargetFlag.Name) {
+ cfg.MinerGasFloor = ctx.GlobalUint64(MinerLegacyGasTargetFlag.Name)
+ }
+ if ctx.GlobalIsSet(MinerGasTargetFlag.Name) {
+ cfg.MinerGasFloor = ctx.GlobalUint64(MinerGasTargetFlag.Name)
+ }
+ if ctx.GlobalIsSet(MinerGasLimitFlag.Name) {
+ cfg.MinerGasCeil = ctx.GlobalUint64(MinerGasLimitFlag.Name)
+ }
if ctx.GlobalIsSet(MinerLegacyGasPriceFlag.Name) {
cfg.MinerGasPrice = GlobalBig(ctx, MinerLegacyGasPriceFlag.Name)
}
@@ -1270,15 +1284,6 @@ func RegisterEthStatsService(stack *node.Node, url string) {
}
}
-// SetupNetwork configures the system for either the main net or some test network.
-func SetupNetwork(ctx *cli.Context) {
- // TODO(fjl): move target gas limit into config
- params.TargetGasLimit = ctx.GlobalUint64(MinerLegacyGasTargetFlag.Name)
- if ctx.GlobalIsSet(MinerGasTargetFlag.Name) {
- params.TargetGasLimit = ctx.GlobalUint64(MinerGasTargetFlag.Name)
- }
-}
-
func SetupMetrics(ctx *cli.Context) {
if metrics.Enabled {
log.Info("Enabling metrics collection")