aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2019-09-06 00:28:52 +1000
committerJohn Newbery <john@johnnewbery.com>2019-09-05 13:51:01 -0400
commitfdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e (patch)
tree900f1d3854337c0239305802a30a57c357d9e240 /src/validation.cpp
parent5e202382a987351a59d5cda98ea9f2aee99f61a5 (diff)
downloadbitcoin-fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e.tar.xz
Ignore old versionbit activations
Adds a hardcoded height to the consensus chain parameters for ignoring versionbit activations prior to a fixed height.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index cbf8c90392..3498915192 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1625,7 +1625,8 @@ public:
bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const override
{
- return ((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) &&
+ return pindex->nHeight >= params.MinBIP9WarningHeight &&
+ ((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) &&
((pindex->nVersion >> bit) & 1) != 0 &&
((ComputeBlockVersion(pindex->pprev, params) >> bit) & 1) == 0;
}