Skip to content

Commit

Permalink
fix(levm): created account in create type tx was not added to substate (
Browse files Browse the repository at this point in the history
#1527)

**Motivation**
The account was not removed when calling selfdestruct in CREATE type
transactions because the new account was not in the accrued_substate

**Description**
- Add the new address to the substate at vm creation time.
  • Loading branch information
LeanSerra authored Dec 18, 2024
1 parent 310e617 commit 55d3c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/vm/levm/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl VM {
selfdestrutct_set: HashSet::new(),
touched_accounts: default_touched_accounts,
touched_storage_slots: default_touched_storage_slots,
created_accounts: HashSet::new(),
created_accounts: HashSet::from([new_contract_address]),
};

Ok(Self {
Expand Down

0 comments on commit 55d3c7c

Please sign in to comment.