-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blockchain: Add ticket exhaustion check.
This adds a new function named checkTicketExhaustion which will return a new rule error if extending a given block with another block that contains a specified number of tickets will result in an unrecoverable chain due to inevitable ticket exhaustion along with tests to ensure proper functionality. The approach taken is such that it should be easy to use in a future consensus change gated behind a vote if that is ultimately desired, which I personally think would be a good idea. An exported variant is also provided that takes the hash of the block to extend for use by external callers such as the mining template code.
- Loading branch information
Showing
4 changed files
with
326 additions
and
0 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
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