diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-07-01 20:29:21 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-07-01 20:20:52 +0200 |
commit | fa5658ed077bfb02b6281d642dc649abdb99b6ee (patch) | |
tree | 412bed2ed13aa79089e0b95731e0e5e7ab51b301 /src/rpc | |
parent | fa11fecf0dac44846a08e1b325547641f2eca957 (diff) | |
download | bitcoin-fa5658ed077bfb02b6281d642dc649abdb99b6ee.tar.xz |
Use DeploymentEnabled to hide VB deployments
The helper was previously unused. This commit changes it to be more
meaningful and puts it to use.
See previous discussion at https://github.com/bitcoin/bitcoin/pull/19438/files#r650687320
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/blockchain.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index e08dad2eb0..c4a89c9772 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1350,8 +1350,7 @@ static RPCHelpMan verifychain() static void SoftForkDescPushBack(const CBlockIndex* active_chain_tip, UniValue& softforks, const Consensus::Params& params, Consensus::BuriedDeployment dep) { // For buried deployments. - // Buried deployments with activation height value of - // std::numeric_limits<int>::max() are disabled and thus hidden. + if (!DeploymentEnabled(params, dep)) return; UniValue rv(UniValue::VOBJ); @@ -1366,8 +1365,8 @@ static void SoftForkDescPushBack(const CBlockIndex* active_chain_tip, UniValue& static void SoftForkDescPushBack(const CBlockIndex* active_chain_tip, UniValue& softforks, const Consensus::Params& consensusParams, Consensus::DeploymentPos id) { // For BIP9 deployments. - // Deployments that are never active are hidden. - if (consensusParams.vDeployments[id].nStartTime == Consensus::BIP9Deployment::NEVER_ACTIVE) return; + + if (!DeploymentEnabled(consensusParams, id)) return; UniValue bip9(UniValue::VOBJ); const ThresholdState thresholdState = g_versionbitscache.State(active_chain_tip, consensusParams, id); |