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

fix: don't reinitialize created accounts #6534

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Dec 6, 2023

Closes #6032

There was an edge case where the initialization function incorrectly replaced the AccountInfo of created accounts with the account info fetched from the fork.

The reason this function exists, is so we can reinitialize accounts that were touched before a fork was active with the account info of the fork. This is required so that the fork can use real accounts even if the account has been loaded previously. for example a getNonce check.

However, newly created accounts should be exempt from this check.

@mattsse mattsse force-pushed the matt/fix-init-created-account branch from 0563356 to d8bc3ac Compare December 6, 2023 19:04
@mattsse mattsse merged commit 5a4daaf into foundry-rs:master Dec 6, 2023
19 checks passed
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.

Contract state persists after creating a new fork
2 participants