-
Notifications
You must be signed in to change notification settings - Fork 760
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
modify rpcStataManager getAccount #3345
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
I have verified that this resolves the issue with non-existent accounts returned by a remote RPC (which do indeed seem to return a string of 0s for the |
Would be useful to capture some data and add a unit test. |
This should already be covered in the existing tests. I've also updated our |
Have also updated the check of the |
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.
LGTM! Thanks for the PR.
When getting an account from the provider that has never been touched, the returned codeHash is not keccak(""), but just empty bytes (0...0). Therefore, the getAccount function will not return "undefined" but an account with empty bytes.
This creates a problem in some edge cases. For example, when forking a network and creating a contract within a contract, the evm will revert with collision error, due to this implementation.