fix regtest mining in internal miner
Regtest-mode is a special case for the internal miner. The setgenerate RPC code is written with this assumption. Code taken from current Bitcoin 0.9
This commit is contained in:
parent
44f5b19a90
commit
72bfa77114
|
@ -571,6 +571,12 @@ void static DogecoinMiner(CWallet *pwallet)
|
|||
SetThreadPriority(THREAD_PRIORITY_NORMAL);
|
||||
CheckWork(pblock, *pwallet, reservekey);
|
||||
SetThreadPriority(THREAD_PRIORITY_LOWEST);
|
||||
|
||||
// In regression test mode, stop mining after a block is found. This
|
||||
// allows developers to controllably generate a block on demand.
|
||||
if (Params().NetworkID() == CChainParams::REGTEST)
|
||||
throw boost::thread_interrupted();
|
||||
|
||||
break;
|
||||
}
|
||||
pblock->nNonce += 1;
|
||||
|
|
Loading…
Reference in a new issue