Rename min-difficulty flag to remove off-by-one in the name

This commit is contained in:
Jack Grigg
2018-10-04 23:26:05 +01:00
parent b86dc98047
commit 1f7ee4af70
4 changed files with 10 additions and 8 deletions

View File

@@ -103,7 +103,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams,
pblock->nTime = std::max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
// Updating time can change work required on testnet:
if (consensusParams.nPowAllowMinDifficultyBlocksFromHeight) {
if (consensusParams.nPowAllowMinDifficultyBlocksAfterHeight) {
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, consensusParams);
}
}
@@ -727,7 +727,7 @@ void static BitcoinMiner()
// Update nNonce and nTime
pblock->nNonce = ArithToUint256(UintToArith256(pblock->nNonce) + 1);
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
if (chainparams.GetConsensus().nPowAllowMinDifficultyBlocksFromHeight)
if (chainparams.GetConsensus().nPowAllowMinDifficultyBlocksAfterHeight)
{
// Changing pblock->nTime can change work required on testnet:
hashTarget.SetCompact(pblock->nBits);