diff options
| author | Anthony Towns <[email protected]> | 2019-09-06 00:28:52 +1000 |
|---|---|---|
| committer | John Newbery <[email protected]> | 2019-09-05 13:51:01 -0400 |
| commit | fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e (patch) | |
| tree | 900f1d3854337c0239305802a30a57c357d9e240 /src/validation.cpp | |
| parent | Merge #16624: wallet: encapsulate transactions state (diff) | |
| download | discoin-fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e.tar.xz discoin-fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e.zip | |
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 cbf8c9039..349891519 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; } |