-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(levm): remove accounts in selfdestruct (#1566)
**Motivation** We were not handling the remove case well in `selfdestruct`. When removing it directly from from the cache, it generated a discrepancy in the root. **Description** - When we have addresses in `accrued_substate.selfdestruct_set`, we assign the default value to the account, marking the account as empty. - We check in `get_state_transitions` if `new_state_account.is_empty()` and assign the value to the `removed` field. - Handle the case when `target_account` is the same as `current_call_frame.to`. In that case, we should burn the eth.
- Loading branch information
1 parent
cdaa844
commit 4952d7b
Showing
3 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters