diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-04-07 22:22:06 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-04-07 22:22:06 +0800 |
commit | b801be99d47ba09121a3e7d14aa028f828525b61 (patch) | |
tree | ffa8ffe28b6e7539cfd9baa6aa0b3c48522b91fc /eth/backend.go | |
parent | cc13d576f07fb6803e09fb42880591a67b8b0ef6 (diff) | |
download | dexon-b801be99d47ba09121a3e7d14aa028f828525b61.tar.gz dexon-b801be99d47ba09121a3e7d14aa028f828525b61.tar.zst dexon-b801be99d47ba09121a3e7d14aa028f828525b61.zip |
consensus, eth: don't CPU mine by default during remote mining
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/eth/backend.go b/eth/backend.go index f241d5f34..df5460201 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -240,8 +240,10 @@ func CreateConsensusEngine(ctx *node.ServiceContext, config *Config, chainConfig log.Warn("Ethash used in shared mode") return ethash.NewShared() default: - return ethash.New(ctx.ResolvePath(config.EthashCacheDir), config.EthashCachesInMem, config.EthashCachesOnDisk, + 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 } } |