aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorjtimon <[email protected]>2014-03-07 22:47:56 -0800
committerjtimon <[email protected]>2014-06-04 13:29:35 +0200
commit2595b9ac23735649f4601c27924821641611696e (patch)
treefb5efd3cf3d611feb5c43c4736472bc506bdd92d /src/miner.cpp
parentAdd MineBlocksOnDemand chain parameter (diff)
downloaddiscoin-2595b9ac23735649f4601c27924821641611696e.tar.xz
discoin-2595b9ac23735649f4601c27924821641611696e.zip
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 e980fdc42..44c2faaa4 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();
}