aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2021-03-27 23:00:14 +1000
committerAndrew Chow <achow101-github@achow101.com>2021-04-15 20:59:13 -0400
commit3acf0379e0979ea4bdd03976f4987aa6711eb92f (patch)
tree03f6ae026ba46234871db7ba08f789d67f60620d /src/rpc/blockchain.cpp
parentb529222ad18f7facbaff394455875b4aa65d653e (diff)
downloadbitcoin-3acf0379e0979ea4bdd03976f4987aa6711eb92f.tar.xz
versionbits: Add explicit NEVER_ACTIVE deployments
Previously we used deployments that would timeout prior to Bitcoin's invention, which allowed the deployment to still be activated in unit tests. This switches those deployments to be truly never active. Github-Pull: #21377 Rebased-From: 55ac5f568a3b73d6f1ef4654617fb76e8bcbccdf
Diffstat (limited to 'src/rpc/blockchain.cpp')
-rw-r--r--src/rpc/blockchain.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 2b4d26d855..90cf8d6d14 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -1214,10 +1214,8 @@ static void BuriedForkDescPushBack(UniValue& softforks, const std::string &name,
static void BIP9SoftForkDescPushBack(UniValue& softforks, const std::string &name, const Consensus::Params& consensusParams, Consensus::DeploymentPos id) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
{
// For BIP9 deployments.
- // Deployments (e.g. testdummy) with timeout value before Jan 1, 2009 are hidden.
- // A timeout value of 0 guarantees a softfork will never be activated.
- // This is used when merging logic to implement a proposed softfork without a specified deployment schedule.
- if (consensusParams.vDeployments[id].nTimeout <= 1230768000) return;
+ // Deployments that are never active are hidden.
+ if (consensusParams.vDeployments[id].nStartTime == Consensus::BIP9Deployment::NEVER_ACTIVE) return;
UniValue bip9(UniValue::VOBJ);
const ThresholdState thresholdState = VersionBitsTipState(consensusParams, id);