Changeset View
Changeset View
Standalone View
Standalone View
src/consensus/activation.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | bool IsGravitonEnabled(const Consensus::Params ¶ms, | ||||
const CBlockIndex *pindexPrev) { | const CBlockIndex *pindexPrev) { | ||||
if (pindexPrev == nullptr) { | if (pindexPrev == nullptr) { | ||||
return false; | return false; | ||||
} | } | ||||
return IsGravitonEnabled(params, pindexPrev->nHeight); | return IsGravitonEnabled(params, pindexPrev->nHeight); | ||||
} | } | ||||
static bool IsPhononEnabled(const Consensus::Params ¶ms, int32_t nHeight) { | |||||
return nHeight >= params.phononHeight; | |||||
} | |||||
bool IsPhononEnabled(const Consensus::Params ¶ms, | bool IsPhononEnabled(const Consensus::Params ¶ms, | ||||
const CBlockIndex *pindexPrev) { | const CBlockIndex *pindexPrev) { | ||||
if (pindexPrev == nullptr) { | if (pindexPrev == nullptr) { | ||||
return false; | return false; | ||||
} | } | ||||
return pindexPrev->GetMedianTimePast() >= params.phononActivationTime; | return IsPhononEnabled(params, pindexPrev->nHeight); | ||||
} | } | ||||
bool IsAxionEnabled(const Consensus::Params ¶ms, | bool IsAxionEnabled(const Consensus::Params ¶ms, | ||||
const CBlockIndex *pindexPrev) { | const CBlockIndex *pindexPrev) { | ||||
if (pindexPrev == nullptr) { | if (pindexPrev == nullptr) { | ||||
return false; | return false; | ||||
} | } | ||||
return pindexPrev->GetMedianTimePast() >= | return pindexPrev->GetMedianTimePast() >= | ||||
gArgs.GetArg("-axionactivationtime", params.axionActivationTime); | gArgs.GetArg("-axionactivationtime", params.axionActivationTime); | ||||
} | } |