Removes write version from StorableAccountsWithHashesAndWriteVersions#561
Merged
brooksprumo merged 1 commit intoanza-xyz:masterfrom Apr 3, 2024
Conversation
brooksprumo
commented
Apr 3, 2024
Author
brooksprumo
left a comment
There was a problem hiding this comment.
There's a lot of noise in the diff due to renaming the type and removing a parameter. I've tried to call out the important parts.
| .map(|account| account.data().len()) | ||
| .unwrap_or_default() as u64, | ||
| write_version_obsolete, | ||
| write_version_obsolete: 0, |
Author
There was a problem hiding this comment.
And finally, we explicitly always store a zero for write version!
Comment on lines
+906
to
+907
| fn test_storable_accounts_with_hashes_new2() { | ||
| test_mismatch(false); |
Author
There was a problem hiding this comment.
The test_mismatch() stuff can be refactored. I purposely didn't do that here in this PR to keep the diff small. I'll do the cleanup in a follow up PR.
| &StorableAccountsWithHashes::<'_, '_, _, _, &AccountHash>::new(accounts), | ||
| ) | ||
| } else { | ||
| let write_versions = vec![0; accounts.len()]; |
Author
There was a problem hiding this comment.
And now we don't need to create this vector of zeroes either!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #561 +/- ##
=========================================
- Coverage 81.8% 81.8% -0.1%
=========================================
Files 847 847
Lines 229180 229144 -36
=========================================
- Hits 187600 187502 -98
- Misses 41580 41642 +62 🚀 New features to boost your workflow:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Now that we no longer use the write version when storing accounts (see #476), and
StorableAccountsno longer contains anything about write version either (see #542),StorableAccountsWithHashesAndWriteVersionsdoes not need to care either.Summary of Changes
Remove write version from StorableAccountsWithHashesAndWriteVersions.