diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-09-27 15:25:47 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-09-27 15:25:53 -0400 |
commit | 6b2210f1016c9ed96ce470e588e4cb12fa36a900 (patch) | |
tree | 5447d11910bee85a34c7c6300f4b9fd5f4e2d9f4 /src/consensus | |
parent | a6c8aed1f140bef942b32af8aea78f0d5458cd17 (diff) | |
parent | fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e (diff) |
Merge #16713: Ignore old versionbit activations to avoid 'unknown softforks' warning
fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e Ignore old versionbit activations (Anthony Towns)
Pull request description:
PR 16060 removed the CSV and Segwit BIP9 softfork definitions and hard-coded ('buried') the activation heights. The versionbits code will warn users if an undefined softfork has been signalled in block header versions, and removing the CSV/Segwit definitions caused those warnings to be triggered.
Change the BIP 9 warning code to only check for unknown softforks after the segwit activation height.
ACKs for top commit:
MarcoFalke:
ACK fdb3e8f8b2
ajtowns:
ACK fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e for what it's worth
achow101:
ACK fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e
Sjors:
ACK fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e. It makes the bit 0 warning go away in mainnet and testnet QT when a new block arrives. I think the code is clear enough.
jonatack:
ACK fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e
Tree-SHA512: e6fd34e8902f8c7affb28e8951803e47d542710d5f1229000746656a37ee59d754439fc33e36b7eef87544262e5aac374645db91b74cb507e73514003ca7a67f
Diffstat (limited to 'src/consensus')
-rw-r--r-- | src/consensus/params.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/consensus/params.h b/src/consensus/params.h index 8263b0fef4..2f8c490dc4 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -62,6 +62,9 @@ struct Params { * Note that segwit v0 script rules are enforced on all blocks except the * BIP 16 exception blocks. */ int SegwitHeight; + /** Don't warn about unknown BIP 9 activations below this height. + * This prevents us from warning about the CSV and segwit activations. */ + int MinBIP9WarningHeight; /** * Minimum blocks including miner confirmation of the total of 2016 blocks in a retargeting period, * (nPowTargetTimespan / nPowTargetSpacing) which is also used for BIP9 deployments. |