mirror of https://github.com/poanetwork/quorum.git
Disable ethash by replacing with ethash.NewFullFake
This commit is contained in:
parent
df4267a256
commit
2e19f7905d
|
@ -235,22 +235,11 @@ func CreateConsensusEngine(ctx *node.ServiceContext, config *Config, chainConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise assume proof-of-work
|
// Otherwise assume proof-of-work
|
||||||
switch {
|
// For Quorum, Raft run as a separate service, so
|
||||||
case config.PowFake:
|
// the Ethereum service still needs a consensus engine,
|
||||||
log.Warn("Ethash used in fake mode")
|
// use the consensus with the lightest overhead
|
||||||
return ethash.NewFaker()
|
log.Warn("Ethash used in full fake mode")
|
||||||
case config.PowTest:
|
return ethash.NewFullFaker()
|
||||||
log.Warn("Ethash used in test mode")
|
|
||||||
return ethash.NewTester()
|
|
||||||
case config.PowShared:
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// APIs returns the collection of RPC services the ethereum package offers.
|
// APIs returns the collection of RPC services the ethereum package offers.
|
||||||
|
|
Loading…
Reference in New Issue