diff options
author | Shaul Kfir <shaul.kfir@gmail.com> | 2015-02-17 08:46:51 -0500 |
---|---|---|
committer | Shaul Kfir <shaul.kfir@gmail.com> | 2015-02-17 08:46:51 -0500 |
commit | e5ece053da705a630bb664e16036299915ac1246 (patch) | |
tree | 532f7872bc94d87796ddb5143cf34b5fdf789c4b /src/pow.cpp | |
parent | 175d86e633bedcfb642fb326f1ec0b43c14c4f3b (diff) |
Rename Interval() to DifficultyAdjustmentInterval()
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 e49f0d104c..6dd5c4c12c 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); |