![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
#include "consensus/upgrades.h"Go to the source code of this file.
Functions | |
| UpgradeState | NetworkUpgradeState (int nHeight, const Consensus::Params ¶ms, Consensus::UpgradeIndex idx) |
| Checks the state of a given network upgrade based on block height. More... | |
| 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. More... | |
| 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 current "epoch"). More... | |
| 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. More... | |
| bool | IsActivationHeightForAnyUpgrade (int nHeight, const Consensus::Params ¶ms) |
| Returns true if the given block height is the activation height for any upgrade. More... | |
| 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 known upgrades. More... | |
| 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 are no more known upgrades. More... | |
Variables | |
| const struct NUInfo | NetworkUpgradeInfo [Consensus::MAX_NETWORK_UPGRADES] |
| General information about each network upgrade. More... | |
| int CurrentEpoch | ( | int | nHeight, |
| const Consensus::Params & | params | ||
| ) |
Returns the index of the most recent upgrade as of the given block height (corresponding to the current "epoch").
Consensus::BASE_NETWORK is the default value if no upgrades are active. Caller must check that the height is >= 0 (and handle unknown heights).
Definition at line 115 of file upgrades.cpp.
| bool IsActivationHeight | ( | int | nHeight, |
| const Consensus::Params & | params, | ||
| Consensus::UpgradeIndex | idx | ||
| ) |
Returns true if the given block height is the activation height for the given upgrade.
Definition at line 124 of file upgrades.cpp.
| bool IsActivationHeightForAnyUpgrade | ( | int | nHeight, |
| const Consensus::Params & | params | ||
| ) |
Returns true if the given block height is the activation height for any upgrade.
Definition at line 139 of file upgrades.cpp.
| bool NetworkUpgradeActive | ( | int | nHeight, |
| const Consensus::Params & | params, | ||
| Consensus::UpgradeIndex | idx | ||
| ) |
Returns true if the given network upgrade is active as of the given block height.
Caller must check that the height is >= 0 (and handle unknown heights).
Definition at line 107 of file upgrades.cpp.
| UpgradeState NetworkUpgradeState | ( | int | nHeight, |
| const Consensus::Params & | params, | ||
| Consensus::UpgradeIndex | idx | ||
| ) |
Checks the state of a given network upgrade based on block height.
Caller must check that the height is >= 0 (and handle unknown heights).
Definition at line 82 of file upgrades.cpp.
| Optional<int> NextActivationHeight | ( | int | nHeight, |
| const Consensus::Params & | params | ||
| ) |
Returns the activation height for the next upgrade after the given block height, or nullopt if there are no more known upgrades.
Definition at line 170 of file upgrades.cpp.
| Optional<int> NextEpoch | ( | int | nHeight, |
| const Consensus::Params & | params | ||
| ) |
Returns the index of the next upgrade after the given block height, or nullopt if there are no more known upgrades.
Definition at line 155 of file upgrades.cpp.
| const struct NUInfo NetworkUpgradeInfo[Consensus::MAX_NETWORK_UPGRADES] |
General information about each network upgrade.
Ordered by Consensus::UpgradeIndex.
If the upgrade name has many words, use the '_' character to divide them. We are using it in the -nuparams startup arg and input it with spaces is just ugly.
Definition at line 1 of file upgrades.cpp.