This repository was archived by the owner on Jan 22, 2025. It is now read-only.
calculate ref counts earlier to prevent bad clean#9147
Merged
sakridge merged 1 commit intosolana-labs:masterfrom Mar 29, 2020
Merged
calculate ref counts earlier to prevent bad clean#9147sakridge merged 1 commit intosolana-labs:masterfrom
sakridge merged 1 commit intosolana-labs:masterfrom
Conversation
837f129 to
027f570
Compare
ryoqun
reviewed
Mar 29, 2020
Contributor
|
if possible, we'd like to have a test for this although writing one would be cumbersome as this is a bit a corner case. |
Contributor
Codecov Report
@@ Coverage Diff @@
## master #9147 +/- ##
========================================
- Coverage 80.5% 80.5% -0.1%
========================================
Files 271 271
Lines 59610 59611 +1
========================================
Hits 48026 48026
- Misses 11584 11585 +1 |
027f570 to
6497848
Compare
6497848 to
aa6cc73
Compare
mergify Bot
pushed a commit
that referenced
this pull request
Mar 29, 2020
(cherry picked from commit b1771b9)
solana-grimes
pushed a commit
that referenced
this pull request
Mar 29, 2020
ryoqun
reviewed
Mar 30, 2020
Contributor
ryoqun
left a comment
There was a problem hiding this comment.
LGTM! Thanks for cleaning up the logic!
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.
Problem
Storage ref counts can prevent an account from being cleaned, but that also affects if another item would be cleaned. We don't go back and update the storage counts of those other items.
Summary of Changes
Calculate ref counts in earlier loop which does re-calculate the storage counts.
Fixes #9137