diff options
| author | Eric Lombrozo <[email protected]> | 2015-10-19 08:25:29 -0400 |
|---|---|---|
| committer | Eric Lombrozo <[email protected]> | 2015-10-19 14:25:21 -0400 |
| commit | 7801f4387d96c19de6dedc518e45d3037d9c53fa (patch) | |
| tree | ada41d5bdb2ddfc03233b58fe9fa0bca51f72edf /src/pow.cpp | |
| parent | Merge pull request #6837 (diff) | |
| download | discoin-7801f4387d96c19de6dedc518e45d3037d9c53fa.tar.xz discoin-7801f4387d96c19de6dedc518e45d3037d9c53fa.zip | |
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 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); |