From 7801f4387d96c19de6dedc518e45d3037d9c53fa Mon Sep 17 00:00:00 2001 From: Eric Lombrozo Date: Mon, 19 Oct 2015 08:25:29 -0400 Subject: Added fPowNoRetargeting field to Consensus::Params that disables nBits recalculation. --- src/pow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pow.cpp') diff --git a/src/pow.cpp b/src/pow.cpp index bb53ad204b..5ace3fbc9b 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -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); -- cgit v1.2.3