Skip to content

Commit

Permalink
remove item from trie_db first
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmlm committed Apr 26, 2023
1 parent d9b4053 commit dd320a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/executor/src/adapter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ impl<'a> ApplyBackend for RTEvmExecutorAdapter<'a> {
let is_empty =
self.apply(address, basic, code, storage, reset_storage);
if is_empty && delete_empty {
pnk!(self.state.remove(address.as_bytes()));
self.trie_db.trie_remove(address.as_bytes());
pnk!(self.state.remove(address.as_bytes()));
}
}
Apply::Delete { address } => {
let _ = self.state.remove(address.as_bytes());
self.trie_db.trie_remove(address.as_bytes());
pnk!(self.state.remove(address.as_bytes()));
}
}
}
Expand Down

0 comments on commit dd320a0

Please sign in to comment.