Fix TargetTimespan calculation

This commit is contained in:
Jeremiah Buddenhagen 2018-04-27 16:17:34 -07:00
parent 41104146b1
commit 2b919e5797

View File

@ -70,9 +70,9 @@ struct Params {
return nTargetTimespan_Version1; return nTargetTimespan_Version1;
// V2 // V2
if (height < nHeight_Difficulty_Version3) if (height < nHeight_Difficulty_Version3)
return nInterval_Version2 * nPowTargetSpacing; return nAveragingInterval_Version2 * nPowTargetSpacing;
// V3 // V3
return nInterval_Version3 * nPowTargetSpacing; return nAveragingInterval_Version3 * nPowTargetSpacing;
} }
int64_t DifficultyAdjustmentInterval(int height) const { int64_t DifficultyAdjustmentInterval(int height) const {