Skip to content
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

token: Reassign and reallocate accounts on close #3415

Merged
merged 4 commits into from
Aug 3, 2022

Conversation

joncinque
Copy link
Contributor

Problem

Closing token accounts sets data to 0, but it's still possible to re-use closed accounts by initializing again in the same transaction.

Solution

Completely close the account by reassigning it back to the system program and reallocating the account to 0, as if it were totally new.

@joncinque
Copy link
Contributor Author

This contains reverts for #3416 and #3417 in order to match what's currently deployed to mainnet. Once this lands, we'll reapply those patches.

@joncinque joncinque merged commit 4fadd55 into solana-labs:master Aug 3, 2022
@joncinque joncinque deleted the tk-reassign branch August 3, 2022 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant