diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-10-20 12:07:06 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-10-20 12:07:44 +0200 |
| commit | c834f568693bfae2ce32a2532ac846a868bbee50 (patch) | |
| tree | a32ec35716248b674890437fe7abb806e15f0bae /src/pow.cpp | |
| parent | Merge pull request #6829 (diff) | |
| parent | Added fPowNoRetargeting field to Consensus::Params that disables nBits recalc... (diff) | |
| download | discoin-c834f568693bfae2ce32a2532ac846a868bbee50.tar.xz discoin-c834f568693bfae2ce32a2532ac846a868bbee50.zip | |
Merge pull request #6853
7801f43 Added fPowNoRetargeting field to Consensus::Params that disables nBits recalculation. (Eric Lombrozo)
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 bb53ad204..5ace3fbc9 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); |