forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add push and get methods for RestartLastVotedForkSlots (solana-labs#3…
…3613) * Add push and get methods for RestartLastVotedForkSlots * Improve expression format. * Remove fill() from RestartLastVotedForkSlots and move into constructor. * Update ABI signature. * Use flate2 compress directly instead of relying on CompressedSlots. * Make constructor of RestartLastVotedForkSlots return error if necessary. * Use minmax and remove unnecessary code. * Replace flate2 with run-length encoding in RestartLastVotedForkSlots. * Remove accidentally added file. * The passed in last_voted_fork don't need to be mutable any more. * Switch to different type of run-length encoding. * Fix typo. * Move constant into RestartLastVotedForkSlots. * Use BitVec in RawOffsets. * Remove the unnecessary clone. * Use iter functions for RLE. * Use take_while instead of loop. * Change Run length encoding to iterator implementation. * Allow one slot in RestartLastVotedForkSlots. * Various simplifications. * Fix various errors and use customized error type. * Various simplifications. * Return error from push_get_restart_last_voted_fork_slots and remove unnecessary constraints in to_slots. * Allow 81k slots on RestartLastVotedForkSlots. * Limit MAX_SLOTS to 65535 so we can go back to u16. * Use u16::MAX instead of 65535.
- Loading branch information
1 parent
9a78924
commit 3081b43
Showing
2 changed files
with
346 additions
and
73 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
Oops, something went wrong.