mirror of https://github.com/zcash/zips.git
Update example to use real network upgrade functions
This commit is contained in:
parent
065a4a6b96
commit
1f04e2745b
|
@ -118,15 +118,15 @@ by block height checks. For example:
|
|||
|
||||
.. code:: cpp
|
||||
|
||||
if (chainActive.Tip()->nHeight >= OVERWINTER.ACTIVATION_HEIGHT) {
|
||||
if (CurrentEpoch(chainActive.Height(), Params().GetConsensus()) == Consensus::UPGRADE_OVERWINTER) {
|
||||
// Overwinter-specific logic
|
||||
} else {
|
||||
// Pre-Overwinter logic
|
||||
// Non-Overwinter logic
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
if (pindex->nHeight >= OVERWINTER.ACTIVATION_HEIGHT) {
|
||||
if (NetworkUpgradeActive(pindex->nHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
||||
// Overwinter consensus rules applied to block
|
||||
} else {
|
||||
// Pre-Overwinter consensus rules applied to block
|
||||
|
|
Loading…
Reference in New Issue