Changeset View
Changeset View
Standalone View
Standalone View
src/consensus/activation.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | bool IsMagneticAnomalyEnabled(const Config &config, | ||||
const CBlockIndex *pindexPrev) { | const CBlockIndex *pindexPrev) { | ||||
if (pindexPrev == nullptr) { | if (pindexPrev == nullptr) { | ||||
return false; | return false; | ||||
} | } | ||||
return IsMagneticAnomalyEnabled(config, pindexPrev->nHeight); | return IsMagneticAnomalyEnabled(config, pindexPrev->nHeight); | ||||
} | } | ||||
bool IsGreatWallEnabled(const Config &config, const CBlockIndex *pindexPrev) { | |||||
if (pindexPrev == nullptr) { | |||||
return false; | |||||
} | |||||
return pindexPrev->GetMedianTimePast() >= | |||||
gArgs.GetArg( | |||||
"-greatwallactivationtime", | |||||
config.GetChainParams().GetConsensus().greatWallActivationTime); | |||||
} | |||||
bool IsGravitonEnabled(const Config &config, const CBlockIndex *pindexPrev) { | bool IsGravitonEnabled(const Config &config, const CBlockIndex *pindexPrev) { | ||||
if (pindexPrev == nullptr) { | if (pindexPrev == nullptr) { | ||||
return false; | return false; | ||||
} | } | ||||
return pindexPrev->GetMedianTimePast() >= | return pindexPrev->GetMedianTimePast() >= | ||||
gArgs.GetArg( | gArgs.GetArg( | ||||
"-gravitonactivationtime", | "-gravitonactivationtime", | ||||
config.GetChainParams().GetConsensus().gravitonActivationTime); | config.GetChainParams().GetConsensus().gravitonActivationTime); | ||||
} | } |