![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
#include <params.h>
Public Attributes | |
| int | nProtocolVersion |
| The first protocol version which will understand the new consensus rules. More... | |
| int | nActivationHeight |
| Height of the first block for which the new consensus rules will be active. More... | |
| Optional< uint256 > | hashActivationBlock |
| The hash of the block at height nActivationHeight, if known. More... | |
Static Public Attributes | |
| static constexpr int | ALWAYS_ACTIVE = 0 |
| Special value for nActivationHeight indicating that the upgrade is always active. More... | |
| static constexpr int | NO_ACTIVATION_HEIGHT = -1 |
| Special value for nActivationHeight indicating that the upgrade will never activate. More... | |
|
staticconstexpr |
Special value for nActivationHeight indicating that the upgrade is always active.
This is useful for testing, as it means tests don't need to deal with the activation process (namely, faking a chain of somewhat-arbitrary length).
New blockchains that want to enable upgrade rules from the beginning can also use this value. However, additional care must be taken to ensure the genesis block satisfies the enabled rules.
The hash of the block at height nActivationHeight, if known.
This is set manually after a network upgrade activates.
We use this in IsInitialBlockDownload to detect whether we are potentially being fed a fake alternate chain. We use NU activation blocks for this purpose instead of the checkpoint blocks, because network upgrades (should) have significantly more scrutiny than regular releases. nMinimumChainWork MUST be set to at least the chain work of this block, otherwise this detection will have false positives.
| int Consensus::NetworkUpgrade::nActivationHeight |
|
staticconstexpr |
| int Consensus::NetworkUpgrade::nProtocolVersion |