Add method for fetching the next activation height after a given block height

This commit is contained in:
Jack Grigg
2018-02-02 15:13:48 +00:00
parent 548683767c
commit 149d69e36b
3 changed files with 59 additions and 0 deletions

View File

@@ -7,6 +7,8 @@
#include "consensus/params.h"
#include <boost/optional.hpp>
enum UpgradeState {
UPGRADE_DISABLED,
UPGRADE_PENDING,
@@ -74,4 +76,12 @@ bool IsActivationHeightForAnyUpgrade(
int nHeight,
const Consensus::Params& params);
/**
* Returns the activation height for the next upgrade after the given block height,
* or boost::none if there are no more known upgrades.
*/
boost::optional<int> NextActivationHeight(
int nHeight,
const Consensus::Params& params);
#endif // ZCASH_CONSENSUS_UPGRADES_H