-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix self destruct gas charges #483
fix self destruct gas charges #483
Conversation
statelessGas := evm.Accesses.TouchBasicData(contractAddr[:], false) | ||
balanceIsZero := evm.StateDB.GetBalance(contractAddr).Sign() == 0 | ||
|
||
if _, isPrecompile := evm.precompile(beneficiaryAddr); isPrecompile && balanceIsZero { |
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. We might have changed that in one of the EIP update PRs, that I still need to review, so I'm not merging right away, but I agree this is against the spec.
contractAddr := contract.Address() | ||
|
||
statelessGas := evm.Accesses.TouchBasicData(contractAddr[:], false) |
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.
While it's true that this touch should have not practical effect, I'd still keep it after the precompile if.
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
b8bc851
into
gballet:kaustinen-with-shapella
No description provided.