Merge pull request #318 from jimthematrix/disable-ethash

Disable ethash by replacing with ethash.NewFullFake
This commit is contained in:
Samer Falah 2018-04-19 15:05:55 -04:00 committed by GitHub
commit aa163f0367
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -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()
}
}