diff options
author | Anthony Towns <aj@erisian.com.au> | 2020-07-03 04:01:23 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2021-06-30 08:18:58 +1000 |
commit | de55304f6e7a8b607e6b3fc7436de50910747b0c (patch) | |
tree | ce1cb7ee0bcad78cb327650e0c4cb5e51b28074a /src/consensus/params.h | |
parent | 2b0d291da8f479739ff394dd92801da8c40b9f8e (diff) |
[refactor] Add versionbits deployments to deploymentstatus.h
Adds support for versionbits deployments to DeploymentEnabled,
DeploymentActiveAfter and DeploymentActiveAt. Also moves versionbitscache
from validation to deploymentstatus.
Diffstat (limited to 'src/consensus/params.h')
-rw-r--r-- | src/consensus/params.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/consensus/params.h b/src/consensus/params.h index 9b4139d76c..7d5fe1a734 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -22,13 +22,14 @@ enum BuriedDeployment : int16_t }; constexpr bool ValidDeployment(BuriedDeployment dep) { return DEPLOYMENT_HEIGHTINCB <= dep && dep <= DEPLOYMENT_SEGWIT; } -enum DeploymentPos +enum DeploymentPos : uint16_t { DEPLOYMENT_TESTDUMMY, DEPLOYMENT_TAPROOT, // Deployment of Schnorr/Taproot (BIPs 340-342) // NOTE: Also add new deployments to VersionBitsDeploymentInfo in versionbits.cpp MAX_VERSION_BITS_DEPLOYMENTS }; +constexpr bool ValidDeployment(DeploymentPos dep) { return DEPLOYMENT_TESTDUMMY <= dep && dep <= DEPLOYMENT_TAPROOT; } /** * Struct for each individual consensus rule change using BIP9. |