mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-10 23:07:52 +00:00
improve miner response to new blocks received to prevent stale blocks being generated
This commit is contained in:
parent
d2d64bfed2
commit
33a04c7cf0
@ -3952,8 +3952,15 @@ void static BitcoinMiner(CWallet *pwallet)
|
||||
do {
|
||||
pblock->nNonce++;
|
||||
hash = pblock->GetPoWHash();
|
||||
|
||||
if ((pblock->nNonce & 0xff) == 0) {
|
||||
boost::this_thread::interruption_point();
|
||||
}
|
||||
if (pindexPrev != pindexBest)
|
||||
break;
|
||||
|
||||
} while( hash > hashTarget &&
|
||||
(pblock->nNonce & 0xffff) != 0 );
|
||||
(pblock->nNonce & 0xfff) != 0 );
|
||||
nHashesDone = 0xffff+1;
|
||||
|
||||
// Check if something found
|
||||
|
Loading…
Reference in New Issue
Block a user