-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
core/vm: Simplify Contract.GetByte function #23974
Conversation
} | ||
|
||
return 0 | ||
return STOP |
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.
Perhaps a comment could help:
return STOP | |
// Reading over code is defined to return the byte 0, which is the STOP instruction | |
return STOP |
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!
I had an identical branch which I was going to PR, but then I looked at the decompilation of the interpreter, and found that it was no practical difference at all, so I didn't bother. Nevertheless, less code is better
Cherry-pick ethereum/go-ethereum#23974 Co-authored-by: Andrei Maiboroda <andrei@ethereum.org>
Small cleanup to remove unneed extra helper + use
STOP
literal instead of0
.