-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix uint256 comparison for stake modifier candidate selection
Upgrading to Bitcoin's latest uint256 type changes the backing storage from an array of 32-bit integers to a byte array. Since the comparison operator implementations changed as well, the less-than comparison for sorting the vector of candidates can produce different block orderings for the historical stake modifier than the original order from before. To ensure that we reproduce the same stake modifier values out of this candidate set, we adopt Peercoin's strategy for sorting the collection that behaves like the old uint256 implementation. peercoin/peercoin@4f8df68
- Loading branch information
1 parent
4937e88
commit 28ee6a7
Showing
2 changed files
with
35 additions
and
1 deletion.
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