diff options
author | Anthony Towns <aj@erisian.com.au> | 2019-09-06 00:28:52 +1000 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2019-09-05 13:51:01 -0400 |
commit | fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e (patch) | |
tree | 900f1d3854337c0239305802a30a57c357d9e240 /src/validation.cpp | |
parent | 5e202382a987351a59d5cda98ea9f2aee99f61a5 (diff) |
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.cpp | 3 |
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; } |