Skip to content

Commit

Permalink
v1.0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
IttriumCore authored Aug 20, 2018
1 parent caba5d6 commit 130e8ca
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,12 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
//control the amount of times the client will check for mintable coins
static bool fMintableCoins = false;
static int nMintableLastCheck = 0;


if (fProofOfStake && (GetTime() - nMintableLastCheck > 1 * 60)) // 1 minute check time
{
nMintableLastCheck = GetTime();
fMintableCoins = pwallet->MintableCoins();
}

while (fGenerateBitcoins || fProofOfStake) {
if (fProofOfStake) {
Expand All @@ -464,18 +469,8 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
continue;
}

while (vNodes.empty() || pwallet->IsLocked() || nReserveBalance >= pwallet->GetBalance() /*|| !masternodeSync.IsSynced()*/)
while (vNodes.empty() || pwallet->IsLocked() || !fMintableCoins || nReserveBalance >= pwallet->GetBalance() || !masternodeSync.IsSynced())
{

if (fProofOfStake && (GetTime() - nMintableLastCheck > 1 * 60)) // 5 minute check time
{
nMintableLastCheck = GetTime();
fMintableCoins = pwallet->MintableCoins();
}

if(fProofOfStake && fMintableCoins)
break;

nLastCoinStakeSearchInterval = 0;
MilliSleep(5000);
if (!fGenerateBitcoins && !fProofOfStake)
Expand Down

0 comments on commit 130e8ca

Please sign in to comment.