-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blockchain+integration: add support for min activation height and cus…
…tom thresholds In this commit, we extend the existing version bits state machine to add support for the new minimum activation height and custom block threshold for activation. We then extend the existing BIP 9 tests (tho this isn't really BIP 9 anymore...) to exercise the new min activation height logic. One thing worth noting here is that logic at the end of BIP 341 doesn't match bitcoind as implemented. The bitcoind logic fixes an off-by-one error in the BIP itself. In addition, the bitcoind state machine has further modifications that disallow a transition from started to defined, which means that at least an activation window must pass before something can activate. In practice, this implementation divergence doesn't matter, assuming the lack of a massive deep re-org (the same assumption bitcoind makes with the hard coded activation heights). We'll need to wrangle with this whenever the next soft fork happens.
- Loading branch information
Showing
3 changed files
with
102 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters