Enable DeveloperPeriodFlag ()

Setting a period !=0 allows mining of empty blocks
This commit is contained in:
Andrea Lanfranchi 2021-10-19 08:50:25 +02:00 committed by GitHub
parent 839e0c9d28
commit a477aaadd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions
cmd/utils
turbo/cli

View File

@ -1310,6 +1310,7 @@ func SetEthConfig(ctx *cli.Context, nodeConfig *node.Config, cfg *ethconfig.Conf
// Create a new developer genesis block or reuse existing one
cfg.Genesis = core.DeveloperGenesisBlock(uint64(ctx.GlobalInt(DeveloperPeriodFlag.Name)), developer)
log.Info("Using custom developer period", "seconds", cfg.Genesis.Config.Clique.Period)
if !ctx.GlobalIsSet(MinerGasPriceFlag.Name) {
cfg.Miner.GasPrice = big.NewInt(1)
}

View File

@ -63,6 +63,7 @@ var DefaultFlags = []cli.Flag{
utils.StaticPeersFlag,
utils.MaxPeersFlag,
utils.ChainFlag,
utils.DeveloperPeriodFlag,
utils.VMEnableDebugFlag,
utils.NetworkIdFlag,
utils.FakePoWFlag,