diff options
author | Eric Lombrozo <elombrozo@gmail.com> | 2015-10-19 08:25:29 -0400 |
---|---|---|
committer | Eric Lombrozo <elombrozo@gmail.com> | 2015-10-19 14:25:21 -0400 |
commit | 7801f4387d96c19de6dedc518e45d3037d9c53fa (patch) | |
tree | ada41d5bdb2ddfc03233b58fe9fa0bca51f72edf /src/pow.cpp | |
parent | 5f5ee0f3ce6bfe8c0b1d15b5a498077f7a59ee03 (diff) |
Added fPowNoRetargeting field to Consensus::Params that disables nBits recalculation.
Diffstat (limited to 'src/pow.cpp')
-rw-r--r-- | src/pow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); |