-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes write version from StorableAccountsWithHashesAndWriteVersions #561
Removes write version from StorableAccountsWithHashesAndWriteVersions #561
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -747,7 +747,7 @@ impl AppendVec { | |||
data_len: account | |||
.map(|account| account.data().len()) | |||
.unwrap_or_default() as u64, | |||
write_version_obsolete, | |||
write_version_obsolete: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And finally, we explicitly always store a zero for write version!
fn test_storable_accounts_with_hashes_new2() { | ||
test_mismatch(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
) | ||
} else { | ||
let write_versions = vec![0; accounts.len()]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And now we don't need to create this vector of zeroes either!
Codecov ReportAll 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem
Now that we no longer use the write version when storing accounts (see #476), and
StorableAccounts
no longer contains anything about write version either (see #542),StorableAccountsWithHashesAndWriteVersions
does not need to care either.Summary of Changes
Remove write version from StorableAccountsWithHashesAndWriteVersions.