aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorjtimon <jtimon@monetize.io>2014-03-07 22:47:56 -0800
committerjtimon <jtimon@monetize.io>2014-06-04 13:29:35 +0200
commit2595b9ac23735649f4601c27924821641611696e (patch)
treefb5efd3cf3d611feb5c43c4736472bc506bdd92d /src/miner.cpp
parentbfa9a1a638d69ec3edc2473eef5f2eee43af5a9d (diff)
Add DefaultMinerThreads chain parameter
Diffstat (limited to 'src/miner.cpp')
-rw-r--r--src/miner.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/miner.cpp b/src/miner.cpp
index e980fdc42d..44c2faaa4c 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -652,8 +652,9 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads)
static boost::thread_group* minerThreads = NULL;
if (nThreads < 0) {
- if (Params().NetworkID() == CChainParams::REGTEST)
- nThreads = 1;
+ // In regtest threads defaults to 1
+ if (Params().DefaultMinerThreads())
+ nThreads = Params().DefaultMinerThreads();
else
nThreads = boost::thread::hardware_concurrency();
}