Skip to content

Commit

Permalink
decommitted code is not a storage slot
Browse files Browse the repository at this point in the history
  • Loading branch information
joonazan committed Aug 30, 2024
1 parent 14c7cd2 commit 45c48c8
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/world_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ impl WorldDiff {
StorageApplicationCyclesSnapshot {
written_storage_slots: self.written_storage_slots.snapshot(),
read_storage_slots: self.read_storage_slots.snapshot(),
decommitted_hashes: self.decommitted_hashes.snapshot(),
}
}

Expand All @@ -355,18 +354,12 @@ impl WorldDiff {
.filter(|slot| !self.written_storage_slots.contains(slot))
.count()
* STORAGE_READ_STORAGE_APPLICATION_CYCLES as usize
+ self
.decommitted_hashes
.added_after(snapshot.decommitted_hashes)
.len()
* STORAGE_READ_STORAGE_APPLICATION_CYCLES as usize
}
}

pub struct StorageApplicationCyclesSnapshot {
written_storage_slots: <RollbackableSet<(H160, U256)> as Rollback>::Snapshot,
read_storage_slots: <RollbackableSet<(H160, U256)> as Rollback>::Snapshot,
decommitted_hashes: <RollbackableSet<U256> as Rollback>::Snapshot,
}

#[derive(Clone, PartialEq, Debug)]
Expand Down

0 comments on commit 45c48c8

Please sign in to comment.