Skip to content

Commit

Permalink
fix(isolate): do not mark cold accounts with arbitrary storage (#9945)
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy authored Feb 24, 2025
1 parent bf9bd30 commit 879154c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/evm/evm/src/inspectors/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,13 @@ impl Inspector<&mut dyn DatabaseExt> for InspectorStackRefMut<'_> {
let JournaledState { state, warm_preloaded_addresses, .. } =
&mut ecx.journaled_state;
for (addr, acc_mut) in state {
// Do not mark accounts and storage cold accounts with arbitrary storage.
if let Some(cheatcodes) = &self.cheatcodes {
if cheatcodes.has_arbitrary_storage(addr) {
continue;
}
}

if !warm_preloaded_addresses.contains(addr) {
acc_mut.mark_cold();
}
Expand Down

0 comments on commit 879154c

Please sign in to comment.