aboutsummaryrefslogtreecommitdiffstats
path: root/consensus/ethash/sealer.go
diff options
context:
space:
mode:
Diffstat (limited to 'consensus/ethash/sealer.go')
-rw-r--r--consensus/ethash/sealer.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/consensus/ethash/sealer.go b/consensus/ethash/sealer.go
index 9a000ed31..784e8f649 100644
--- a/consensus/ethash/sealer.go
+++ b/consensus/ethash/sealer.go
@@ -61,6 +61,9 @@ func (ethash *Ethash) Seal(chain consensus.ChainReader, block *types.Block, stop
if threads == 0 {
threads = runtime.NumCPU()
}
+ if threads < 0 {
+ threads = 0 // Allows disabling local mining without extra logic around local/remote
+ }
var pend sync.WaitGroup
for i := 0; i < threads; i++ {
pend.Add(1)