Skip to content

Commit 130e8ca

Browse files
authored
v1.0.3.2
1 parent caba5d6 commit 130e8ca

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/miner.cpp

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,12 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
455455
//control the amount of times the client will check for mintable coins
456456
static bool fMintableCoins = false;
457457
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+
}
459464

460465
while (fGenerateBitcoins || fProofOfStake) {
461466
if (fProofOfStake) {
@@ -464,18 +469,8 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
464469
continue;
465470
}
466471

467-
while (vNodes.empty() || pwallet->IsLocked() || nReserveBalance >= pwallet->GetBalance() /*|| !masternodeSync.IsSynced()*/)
472+
while (vNodes.empty() || pwallet->IsLocked() || !fMintableCoins || nReserveBalance >= pwallet->GetBalance() || !masternodeSync.IsSynced())
468473
{
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-
479474
nLastCoinStakeSearchInterval = 0;
480475
MilliSleep(5000);
481476
if (!fGenerateBitcoins && !fProofOfStake)

0 commit comments

Comments
 (0)