Skip to content

Commit

Permalink
Merge pull request #10 from hd4r/fix_redundant_if_hashrate_calc
Browse files Browse the repository at this point in the history
Remove redundant if in hashrate calculation
  • Loading branch information
effectsToCause committed Oct 9, 2017
2 parents 652f074 + 22489d0 commit f495e3f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,11 @@ void Miner(CWallet *pwallet)

if (GetTimeMillis() - nHPSTimerStart > timeElapsed)
{
if (GetTimeMillis() - nHPSTimerStart > timeElapsed)
{
dHashesPerMin = 60000.0 * nHashCounter / (GetTimeMillis() - nHPSTimerStart);
nHPSTimerStart = GetTimeMillis();
nHashCounter = 0;
updateHashrate(dHashesPerMin);
printf("Total local hashrate %6.0f hashes/min\n", hashrate);
}
dHashesPerMin = 60000.0 * nHashCounter / (GetTimeMillis() - nHPSTimerStart);
nHPSTimerStart = GetTimeMillis();
nHashCounter = 0;
updateHashrate(dHashesPerMin);
printf("Total local hashrate %6.0f hashes/min\n", hashrate);
}
}
}
Expand Down

0 comments on commit f495e3f

Please sign in to comment.