mirror of https://github.com/poanetwork/quorum.git
Merge pull request #318 from jimthematrix/disable-ethash
Disable ethash by replacing with ethash.NewFullFake
This commit is contained in:
commit
aa163f0367
|
@ -246,10 +246,11 @@ func CreateConsensusEngine(ctx *node.ServiceContext, config *Config, chainConfig
|
||||||
log.Warn("Ethash used in shared mode")
|
log.Warn("Ethash used in shared mode")
|
||||||
return ethash.NewShared()
|
return ethash.NewShared()
|
||||||
default:
|
default:
|
||||||
engine := ethash.New(ctx.ResolvePath(config.EthashCacheDir), config.EthashCachesInMem, config.EthashCachesOnDisk,
|
// For Quorum, Raft run as a separate service, so
|
||||||
config.EthashDatasetDir, config.EthashDatasetsInMem, config.EthashDatasetsOnDisk)
|
// the Ethereum service still needs a consensus engine,
|
||||||
engine.SetThreads(-1) // Disable CPU mining
|
// use the consensus with the lightest overhead
|
||||||
return engine
|
log.Warn("Ethash used in full fake mode")
|
||||||
|
return ethash.NewFullFaker()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue