diff options
author | Anthony Towns <aj@erisian.com.au> | 2021-08-01 18:36:43 +1000 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-08-20 10:36:41 +0300 |
commit | 57fce067a322d4b30ae8516795d5d2a1fe2f9f66 (patch) | |
tree | add90613bcf48874e3956e9e021e32d11a4455eb /src/consensus | |
parent | e9d30fbb3a90dfafebdb026a53b4f632614d660e (diff) | |
download | bitcoin-57fce067a322d4b30ae8516795d5d2a1fe2f9f66.tar.xz |
consensus/params: simplify ValidDeployment check to avoid gcc warning
Github-Pull: bitcoin/bitcoin#22597
Rebased-From: 059171009b0138555f311cedc2553015ff618323
Diffstat (limited to 'src/consensus')
-rw-r--r-- | src/consensus/params.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/consensus/params.h b/src/consensus/params.h index 9205cfee87..77bf7fd0d8 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -23,7 +23,7 @@ enum BuriedDeployment : int16_t { DEPLOYMENT_CSV, DEPLOYMENT_SEGWIT, }; -constexpr bool ValidDeployment(BuriedDeployment dep) { return DEPLOYMENT_HEIGHTINCB <= dep && dep <= DEPLOYMENT_SEGWIT; } +constexpr bool ValidDeployment(BuriedDeployment dep) { return dep <= DEPLOYMENT_SEGWIT; } enum DeploymentPos : uint16_t { DEPLOYMENT_TESTDUMMY, @@ -31,7 +31,7 @@ enum DeploymentPos : uint16_t { // NOTE: Also add new deployments to VersionBitsDeploymentInfo in deploymentinfo.cpp MAX_VERSION_BITS_DEPLOYMENTS }; -constexpr bool ValidDeployment(DeploymentPos dep) { return DEPLOYMENT_TESTDUMMY <= dep && dep <= DEPLOYMENT_TAPROOT; } +constexpr bool ValidDeployment(DeploymentPos dep) { return dep < MAX_VERSION_BITS_DEPLOYMENTS; } /** * Struct for each individual consensus rule change using BIP9. |