mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Add DefaultMinerThreads chain parameter
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user