@@ -335,12 +335,12 @@ var (
335335 MinerGasPriceFlag = BigFlag {
336336 Name : "miner.gasprice" ,
337337 Usage : "Minimal gas price for mining a transactions" ,
338- Value : eth .DefaultConfig .GasPrice ,
338+ Value : eth .DefaultConfig .MinerGasPrice ,
339339 }
340340 MinerLegacyGasPriceFlag = BigFlag {
341341 Name : "gasprice" ,
342342 Usage : "Minimal gas price for mining a transactions (deprecated, use --miner.gasprice)" ,
343- Value : eth .DefaultConfig .GasPrice ,
343+ Value : eth .DefaultConfig .MinerGasPrice ,
344344 }
345345 MinerEtherbaseFlag = cli.StringFlag {
346346 Name : "miner.etherbase" ,
@@ -360,6 +360,11 @@ var (
360360 Name : "extradata" ,
361361 Usage : "Block extra data set by the miner (default = client version, deprecated, use --miner.extradata)" ,
362362 }
363+ MinerRecommitIntervalFlag = cli.DurationFlag {
364+ Name : "miner.recommit" ,
365+ Usage : "Time interval to recreate the block being mined." ,
366+ Value : 3 * time .Second ,
367+ }
363368 // Account settings
364369 UnlockedAccountFlag = cli.StringFlag {
365370 Name : "unlock" ,
@@ -1124,16 +1129,19 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
11241129 cfg .DocRoot = ctx .GlobalString (DocRootFlag .Name )
11251130 }
11261131 if ctx .GlobalIsSet (MinerLegacyExtraDataFlag .Name ) {
1127- cfg .ExtraData = []byte (ctx .GlobalString (MinerLegacyExtraDataFlag .Name ))
1132+ cfg .MinerExtraData = []byte (ctx .GlobalString (MinerLegacyExtraDataFlag .Name ))
11281133 }
11291134 if ctx .GlobalIsSet (MinerExtraDataFlag .Name ) {
1130- cfg .ExtraData = []byte (ctx .GlobalString (MinerExtraDataFlag .Name ))
1135+ cfg .MinerExtraData = []byte (ctx .GlobalString (MinerExtraDataFlag .Name ))
11311136 }
11321137 if ctx .GlobalIsSet (MinerLegacyGasPriceFlag .Name ) {
1133- cfg .GasPrice = GlobalBig (ctx , MinerLegacyGasPriceFlag .Name )
1138+ cfg .MinerGasPrice = GlobalBig (ctx , MinerLegacyGasPriceFlag .Name )
11341139 }
11351140 if ctx .GlobalIsSet (MinerGasPriceFlag .Name ) {
1136- cfg .GasPrice = GlobalBig (ctx , MinerGasPriceFlag .Name )
1141+ cfg .MinerGasPrice = GlobalBig (ctx , MinerGasPriceFlag .Name )
1142+ }
1143+ if ctx .GlobalIsSet (MinerRecommitIntervalFlag .Name ) {
1144+ cfg .MinerRecommit = ctx .Duration (MinerRecommitIntervalFlag .Name )
11371145 }
11381146 if ctx .GlobalIsSet (VMEnableDebugFlag .Name ) {
11391147 // TODO(fjl): force-enable this in --dev mode
@@ -1176,7 +1184,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
11761184
11771185 cfg .Genesis = core .DeveloperGenesisBlock (uint64 (ctx .GlobalInt (DeveloperPeriodFlag .Name )), developer .Address )
11781186 if ! ctx .GlobalIsSet (MinerGasPriceFlag .Name ) && ! ctx .GlobalIsSet (MinerLegacyGasPriceFlag .Name ) {
1179- cfg .GasPrice = big .NewInt (1 )
1187+ cfg .MinerGasPrice = big .NewInt (1 )
11801188 }
11811189 }
11821190 // TODO(fjl): move trie cache generations into config
0 commit comments