-
Notifications
You must be signed in to change notification settings - Fork 847
Removes Bank::replace_program_account() #9396
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 Bank::replace_program_account() #9396
Conversation
33224fc to
a70ae9e
Compare
|
@buffalojoec - requesting your review because |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9396 +/- ##
=========================================
- Coverage 82.5% 82.5% -0.1%
=========================================
Files 895 895
Lines 322472 322425 -47
=========================================
- Hits 266223 266163 -60
- Misses 56249 56262 +13 🚀 New features to boost your workflow:
|
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.
Yeah, this looks correct to me!
I'm pretty sure we can actually axe this code. I was talking to @Lichtso yesterday and he said this is no longer a safe operation for Loader v2 programs due to the global program cache architecture.
EDIT: I guess I can approve if we plan to keep it, otherwise we can just cut it here.
|
The function is |
a70ae9e to
029fef6
Compare
Problem
Bank::replace_program_account() is dead code.
OLD:
When replacing a program via
Bank::replace_program_account(), it incorrectly updates the accounts data size.The fn basically overwrites the old account with the new account. Initially both accounts exist, and afterwards only the new account exists (just now at the old address). So the change in accounts data size is the removal of the old account.
Summary of Changes
Remove it.