fix miner try to stop staker pegging a core

This commit is contained in:
blackjok3r
2018-12-05 16:59:28 +08:00
parent 3a705a843e
commit 1602f04ac8
2 changed files with 11 additions and 7 deletions

View File

@@ -1638,8 +1638,8 @@ void static BitcoinMiner()
fprintf(stderr," POW\n");*/
if ( h > hashTarget )
{
//if ( ASSETCHAINS_STAKED != 0 && KOMODO_MININGTHREADS == 0 )
// sleep(1);
if ( ASSETCHAINS_STAKED != 0 && KOMODO_MININGTHREADS == 0 )
MilliSleep(30);
return false;
}
if ( IS_KOMODO_NOTARY != 0 && B.nTime > GetAdjustedTime() )
@@ -1858,10 +1858,14 @@ void static BitcoinMiner()
}
//fprintf(stderr,"nThreads.%d fGenerate.%d\n",(int32_t)nThreads,fGenerate);
if ( ASSETCHAINS_STAKED > 0 && pwallet != NULL && nThreads == 0 )
nThreads = 1;
else
return;
if ( ASSETCHAINS_STAKED > 0 && nThreads == 0 )
{
if ( pwallet != NULL )
nThreads = 1;
else
return;
}
if ((nThreads == 0 || !fGenerate) && (VERUS_MINTBLOCKS == 0 || pwallet == NULL))
return;