diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-02-18 17:29:17 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-02-18 17:29:28 +0100 |
| commit | 8d0418720c29b72bd369f0b3b23b6d75584f3c08 (patch) | |
| tree | eb4bcc06141923f1e9c94804fce8d52affbc5a38 /src/pow.cpp | |
| parent | Merge #5784: Fix usage of NegateSignatureS in script_tests (diff) | |
| parent | Rename Interval() to DifficultyAdjustmentInterval() (diff) | |
| download | discoin-8d0418720c29b72bd369f0b3b23b6d75584f3c08.tar.xz discoin-8d0418720c29b72bd369f0b3b23b6d75584f3c08.zip | |
Merge #5799: Rename Interval() to DifficultyAdjustmentInterval()
e5ece05 Rename Interval() to DifficultyAdjustmentInterval() (Shaul Kfir)
Diffstat (limited to 'src/pow.cpp')
| -rw-r--r-- | src/pow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pow.cpp b/src/pow.cpp index e49f0d104..6dd5c4c12 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -20,8 +20,8 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead if (pindexLast == NULL) return nProofOfWorkLimit; - // Only change once per interval - if ((pindexLast->nHeight+1) % Params().Interval() != 0) + // Only change once per difficulty adjustment interval + if ((pindexLast->nHeight+1) % Params().DifficultyAdjustmentInterval() != 0) { if (Params().AllowMinDifficultyBlocks()) { @@ -34,7 +34,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead { // Return the last non-special-min-difficulty-rules-block const CBlockIndex* pindex = pindexLast; - while (pindex->pprev && pindex->nHeight % Params().Interval() != 0 && pindex->nBits == nProofOfWorkLimit) + while (pindex->pprev && pindex->nHeight % Params().DifficultyAdjustmentInterval() != 0 && pindex->nBits == nProofOfWorkLimit) pindex = pindex->pprev; return pindex->nBits; } @@ -44,7 +44,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead // Go back by what we want to be 14 days worth of blocks const CBlockIndex* pindexFirst = pindexLast; - for (int i = 0; pindexFirst && i < Params().Interval()-1; i++) + for (int i = 0; pindexFirst && i < Params().DifficultyAdjustmentInterval()-1; i++) pindexFirst = pindexFirst->pprev; assert(pindexFirst); |