-
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/state: invoke OnCodeChange-hook on selfdestruct #30686
Conversation
…80 methods to improve readability and reduce code duplication
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.
sgtm
Correct, we work with the |
…tter readability and consistency
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
This change invokes the OnCodeChange hook when selfdestruct operation is performed, and a contract is removed. This is an event which can be consumed by tracers.
Implemented code change tracking for
selfdestruct
operations by addingOnCodeChange
hooks in theSelfDestruct
andSelfDestruct6780
methods of thehookedStateDB
structure.Motivation:
Now, we can track
OnCodeChange
when the contract is deployed. It would be nice also to be able to track changes (code, codeHash) when the contract is destroyed.Let me know if this makes sense or if I need to improve/fix anything