6 #ifndef PIVX_CONSENSUS_UPGRADES_H
7 #define PIVX_CONSENSUS_UPGRADES_H
UpgradeIndex
Index into Params.vUpgrades and NetworkUpgradeInfo.
boost::optional< T > Optional
Substitute for C++17 std::optional.
Parameters that influence chain consensus.
std::string strName
User-facing name for the upgrade.
std::string strInfo
User-facing information string about the upgrade.
bool NetworkUpgradeActive(int nHeight, const Consensus::Params ¶ms, Consensus::UpgradeIndex idx)
Returns true if the given network upgrade is active as of the given block height.
UpgradeState NetworkUpgradeState(int nHeight, const Consensus::Params ¶ms, Consensus::UpgradeIndex idx)
Checks the state of a given network upgrade based on block height.
int CurrentEpoch(int nHeight, const Consensus::Params ¶ms)
Returns the index of the most recent upgrade as of the given block height (corresponding to the curre...
bool IsActivationHeight(int nHeight, const Consensus::Params ¶ms, Consensus::UpgradeIndex upgrade)
Returns true if the given block height is the activation height for the given upgrade.
bool IsActivationHeightForAnyUpgrade(int nHeight, const Consensus::Params ¶ms)
Returns true if the given block height is the activation height for any upgrade.
Optional< int > NextEpoch(int nHeight, const Consensus::Params ¶ms)
Returns the index of the next upgrade after the given block height, or nullopt if there are no more k...
Optional< int > NextActivationHeight(int nHeight, const Consensus::Params ¶ms)
Returns the activation height for the next upgrade after the given block height, or nullopt if there ...
const struct NUInfo NetworkUpgradeInfo[]
General information about each network upgrade.