Remove unnecessary usage of RentCollector#35121
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #35121 +/- ##
=======================================
Coverage 81.6% 81.6%
=======================================
Files 831 831
Lines 225032 225029 -3
=======================================
+ Hits 183708 183741 +33
+ Misses 41324 41288 -36 |
brooksprumo
left a comment
There was a problem hiding this comment.
lgtm, thanks for the cleanup!
I had to do some digging to understand the context behind where this code came from, and what it was originally intended to do.
In the olden days, we used to allow creating rent-paying accounts. When a new account was created, we'd collect rent from it. This required the rent_collector when storing accounts.
In #22292, it prevented creating rent-paying accounts. As an optimization, #26479 made it so that we don't change the rent epoch for rent-exempt accounts when they are checked for rent collection.
Once the feature gate for #26479 was activated, an issue was discovered that impacted tests and new clusters due to the interaction with epoch being 0. In #26851, it fixed the issue by no longer doing rent collection on newly created accounts (there's a lot of context in this PR, which was interesting).
With #26479 activated and #26851 in place to fix the issue, the feature gate code could be removed. That was done in #28507. This PR removed the code for rent collection when storing accounts. The rent collector was no longer used, yet the parameter to the function was kept (and ignored, I assume to minimize changes in the PR).
And here we are today, finally removing the rent collector parameter!
Wow, lots of history with it. Thanks for digging through it! |
Problem
Accountsmethods are being passed instance ofRentCollector, but it's never used. Maybe it can be removed.Summary of Changes
Update methods to not take
RentCollectoras an argument.Fixes #