Added fPowNoRetargeting field to Consensus::Params that disables nBits recalculation.

This commit is contained in:
Eric Lombrozo
2015-10-19 08:25:29 -04:00
parent 5f5ee0f3ce
commit 7801f4387d
3 changed files with 7 additions and 0 deletions

View File

@ -52,6 +52,9 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params& params)
{
if (params.fPowNoRetargeting)
return pindexLast->nBits;
// Limit adjustment step
int64_t nActualTimespan = pindexLast->GetBlockTime() - nFirstBlockTime;
LogPrintf(" nActualTimespan = %d before bounds\n", nActualTimespan);