This repository was archived by the owner on Jan 22, 2025. It is now read-only.
uses Option<u64> for SlotMeta.last_index (backport #21775)#22915
Merged
mergify[bot] merged 2 commits intov1.8from Feb 3, 2022
Merged
uses Option<u64> for SlotMeta.last_index (backport #21775)#22915mergify[bot] merged 2 commits intov1.8from
mergify[bot] merged 2 commits intov1.8from
Conversation
SlotMeta.last_index may be unknown and current code is using u64::MAX to indicate that: https://github.com/solana-labs/solana/blob/6c108c8fc/ledger/src/blockstore_meta.rs#L169-L174 This lacks type-safety and can introduce bugs if not always checked for Several instances of slot_meta.last_index + 1 are also subject to overflow. This commit updates the type to Option<u64>. Backward compatibility is maintained by customizing serde serialize/deserialize implementations. (cherry picked from commit e08139f) # Conflicts: # core/src/repair_generic_traversal.rs # ledger/src/blockstore.rs # ledger/src/blockstore_meta.rs
Contributor
Author
|
automerge label removed due to a CI failure |
5a70828 to
0bb9a39
Compare
Contributor
Author
|
automerge label removed due to a CI failure |
Codecov Report
@@ Coverage Diff @@
## v1.8 #22915 +/- ##
=======================================
Coverage 81.6% 81.6%
=======================================
Files 464 464
Lines 131738 131741 +3
=======================================
+ Hits 107566 107586 +20
+ Misses 24172 24155 -17 |
Contributor
|
This PR has been automatically locked since there has not been any activity in past 14 days after it was merged. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automatic backport of pull request #21775 done by Mergify.
Cherry-pick of e08139f has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refreshwill re-evaluate the rules@Mergifyio rebasewill rebase this PR on its base branch@Mergifyio updatewill merge the base branch into this PR@Mergifyio backport <destination>will backport this PR on<destination>branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com