22 "Proof of Stake Consensus activation",
26 "New selection for stake modifier",
30 "ZeroCoin protocol activation - start block v4",
34 "New zerocoin serials and zPOS start",
38 "CLTV (BIP65) activation - start block v5",
42 "Activation of zerocoin public spends (spend v3)",
46 "New 256-bit stake modifier - start block v6",
50 "New message sigs - start block v7 - time protocol - zc spend v4",
54 "Sapling Shield - start block v8 - start transaction v3",
58 "New cold-staking rules",
66 "New rewards structure",
74 "Deterministic Masternodes",
93 }
else if (nHeight >= nActivationHeight) {
UpgradeIndex
Index into Params.vUpgrades and NetworkUpgradeInfo.
boost::optional< T > Optional
Substitute for C++17 std::optional.
int nActivationHeight
Height of the first block for which the new consensus rules will be active.
static constexpr int NO_ACTIVATION_HEIGHT
Special value for nActivationHeight indicating that the upgrade will never activate.
Parameters that influence chain consensus.
NetworkUpgrade vUpgrades[MAX_NETWORK_UPGRADES]
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 IsActivationHeightForAnyUpgrade(int nHeight, const Consensus::Params ¶ms)
Returns true if the given block height is the activation height for any upgrade.
bool IsActivationHeight(int nHeight, const Consensus::Params ¶ms, Consensus::UpgradeIndex idx)
Returns true if the given block height is the activation height for the given 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[Consensus::MAX_NETWORK_UPGRADES]
General information about each network upgrade.