File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -455,7 +455,12 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
455
455
// control the amount of times the client will check for mintable coins
456
456
static bool fMintableCoins = false ;
457
457
static int nMintableLastCheck = 0 ;
458
-
458
+
459
+ if (fProofOfStake && (GetTime () - nMintableLastCheck > 1 * 60 )) // 1 minute check time
460
+ {
461
+ nMintableLastCheck = GetTime ();
462
+ fMintableCoins = pwallet->MintableCoins ();
463
+ }
459
464
460
465
while (fGenerateBitcoins || fProofOfStake ) {
461
466
if (fProofOfStake ) {
@@ -464,18 +469,8 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
464
469
continue ;
465
470
}
466
471
467
- while (vNodes.empty () || pwallet->IsLocked () || nReserveBalance >= pwallet->GetBalance () /* || !masternodeSync.IsSynced()*/ )
472
+ while (vNodes.empty () || pwallet->IsLocked () || ! fMintableCoins || nReserveBalance >= pwallet->GetBalance () || !masternodeSync.IsSynced ())
468
473
{
469
-
470
- if (fProofOfStake && (GetTime () - nMintableLastCheck > 1 * 60 )) // 5 minute check time
471
- {
472
- nMintableLastCheck = GetTime ();
473
- fMintableCoins = pwallet->MintableCoins ();
474
- }
475
-
476
- if (fProofOfStake && fMintableCoins )
477
- break ;
478
-
479
474
nLastCoinStakeSearchInterval = 0 ;
480
475
MilliSleep (5000 );
481
476
if (!fGenerateBitcoins && !fProofOfStake )
You can’t perform that action at this time.
0 commit comments