Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
eth: return state error via GetEVM #25876
eth: return state error via GetEVM #25876
Changes from 2 commits
51401fe
c02930b
9551635
6dcdd9d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think there was nothing wrong with this, the way it was. Se https://go.dev/play/p/w3zIAvKsWbV
The
err := vmError
is scoped, and does not overwrite the outer-scopederr
.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.
However, I agree that it makes sense to check the returned err first, like this PR does. So I still approve
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.
Actually, I'm not so sure. So the
vmErr
will (now) potentially return an underlying error, e.g if a part of the trie could not be loaded.In a lot of cases, this will also trigger a secondary error during precheck -- typically something will be zero which shouldn't have been.
In this case, the
vmErr()
is the more interesting error, since it shows the underlying cause ("missing trie node") instead of the effect ("insufficient funds for transfer").So now I'm leaning towards reverting this change
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.
Make sense, reverted the calling site.