From e65fc0eb4d08213c265b9f22034ae7a0bf547686 Mon Sep 17 00:00:00 2001 From: "Grant T. Olson" Date: Thu, 22 Aug 2013 12:45:24 -0400 Subject: [PATCH] Even if we're on a platform that supports fast PoW calculation, we should use safe PoWs when we're only utilizing a single core --- src/proofofwork.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/proofofwork.py b/src/proofofwork.py index f2c32c06..bc9a19af 100644 --- a/src/proofofwork.py +++ b/src/proofofwork.py @@ -52,6 +52,10 @@ def _doFastPoW(target, initialHash): maxCores = 99999 if pool_size > maxCores: pool_size = maxCores + + if pool_size == 1: # Don't mess around with multiprocessing on a single core machine + return _doSafePoW(target, initialHash) + pool = Pool(processes=pool_size) result = [] for i in range(pool_size):