-
Notifications
You must be signed in to change notification settings - Fork 16
feat: post tx hooks #54
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
base: main
Are you sure you want to change the base?
Conversation
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.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
x/vm/keeper/state_transition.go:212
- The variable 'txConfig' is referenced but not defined in the provided context. Ensure that 'txConfig' is properly declared or passed in.
TxHash: txConfig.TxHash,
x/vm/keeper/state_transition.go:231
- The variable 'commit' is used without being defined in the diff. Please ensure that 'commit' is correctly declared or initialized.
else if commit != nil {
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.
Looks good, but I think we should add tests around some of the success and failure conditions here, especially since this is modifying the state transition function.
cumulativeGasUsed += ctx.BlockGasMeter().GasConsumed() | ||
if cumulativeGasUsed > limit { | ||
cumulativeGasUsed = limit | ||
} |
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.
Not too familiar with this code path at this point, but is this the expected behavior? Possibly we should be stopping execution if we've gone over the gas limit and returning a out of gas error?
Reopening the PR #2 from @Reecepbcups
Closes #18