Use IsProtocolV1RetargetingFixed(), IsProtocolV3() everywhere

This commit is contained in:
lateminer
2019-03-27 20:00:34 +03:00
parent 7fd6bdd10d
commit 9148f30fbc
3 changed files with 6 additions and 5 deletions

View File

@@ -67,6 +67,7 @@ struct Params {
int64_t nProtocolV1RetargetingFixedTime;
int64_t nProtocolV2Time;
int64_t nProtocolV3Time;
bool IsProtocolV1RetargetingFixed(int64_t nTime) const { return nTime > nProtocolV1RetargetingFixedTime && nTime != 1395631999; }
bool IsProtocolV2(int64_t nTime) const { return nTime > nProtocolV2Time && nTime != 1407053678; }
bool IsProtocolV3(int64_t nTime) const { return nTime > nProtocolV3Time && nTime != 1444028400; }
unsigned int GetTargetSpacing(int nHeight) { return IsProtocolV2(nHeight) ? 64 : 60; }