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")
|
||||
return ethash.NewShared()
|
||||
default:
|
||||
engine := ethash.New(ctx.ResolvePath(config.EthashCacheDir), config.EthashCachesInMem, config.EthashCachesOnDisk,
|
||||
config.EthashDatasetDir, config.EthashDatasetsInMem, config.EthashDatasetsOnDisk)
|
||||
engine.SetThreads(-1) // Disable CPU mining
|
||||
return engine
|
||||
// For Quorum, Raft run as a separate service, so
|
||||
// the Ethereum service still needs a consensus engine,
|
||||
// use the consensus with the lightest overhead
|
||||
log.Warn("Ethash used in full fake mode")
|
||||
return ethash.NewFullFaker()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue