-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(executor): call hook with state changes after post block balance increments #13050
Conversation
crates/evm/src/execute.rs
Outdated
let transition_account = account | ||
.increment_balance(balance_inc) | ||
.ok_or(BlockValidationError::IncrementBalanceFailed)?; |
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.
balance was already incremented prior to this call. this does it 2nd time
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.
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
|
||
balance_increments | ||
.iter() | ||
.filter(|(_, &balance)| balance != 0) |
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.
this shouldn't be possible but fine leaving as is for now
Closes #13024
Added function to create an
EvmState
from the post-block balance increments. ThisEvmState
is used to call the state hook in the Ethereum and Optimism executors.