respect --fakepow flag when starting geth #20954

This commit is contained in:
Matt Garnett 2020-04-21 11:04:14 -06:00
parent 6c458f32f8
commit db296d781b
No known key found for this signature in database
GPG key ID: 7456C2A96B3D0FD5

View file

@ -1311,6 +1311,9 @@ func setTxPool(ctx *cli.Context, cfg *core.TxPoolConfig) {
} }
func setEthash(ctx *cli.Context, cfg *eth.Config) { func setEthash(ctx *cli.Context, cfg *eth.Config) {
if ctx.GlobalIsSet(FakePoWFlag.Name) {
cfg.Ethash.PowMode = ethash.ModeFake
}
if ctx.GlobalIsSet(EthashCacheDirFlag.Name) { if ctx.GlobalIsSet(EthashCacheDirFlag.Name) {
cfg.Ethash.CacheDir = ctx.GlobalString(EthashCacheDirFlag.Name) cfg.Ethash.CacheDir = ctx.GlobalString(EthashCacheDirFlag.Name)
} }