Skip to content

Commit ec3cbda

Browse files
yoavGrsclaude
andauthored
blockifier: extract CallInfo::get_visited_storage_entries (#14100)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent efaee56 commit ec3cbda

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

crates/blockifier/src/execution/call_info.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -517,12 +517,7 @@ impl CallInfo {
517517
executed_class_hashes.insert(class_hash);
518518

519519
// Storage entries.
520-
let call_storage_entries = call_info
521-
.storage_access_tracker
522-
.accessed_storage_keys
523-
.iter()
524-
.map(|storage_key| (call_info.call.storage_address, *storage_key));
525-
visited_storage_entries.extend(call_storage_entries);
520+
visited_storage_entries.extend(call_info.get_visited_storage_entries());
526521

527522
// Messages.
528523
l2_to_l1_payload_lengths.extend(
@@ -582,6 +577,14 @@ impl CallInfo {
582577
})
583578
}
584579

580+
pub fn get_visited_storage_entries(&self) -> impl Iterator<Item = StorageEntry> + '_ {
581+
let storage_address = self.call.storage_address;
582+
self.storage_access_tracker
583+
.accessed_storage_keys
584+
.iter()
585+
.map(move |key| (storage_address, *key))
586+
}
587+
585588
/// Returns a vector of Starknet Event objects collected during the execution, sorted by the
586589
/// order in which they were emitted.
587590
pub fn get_sorted_events(&self) -> Vec<Event> {

0 commit comments

Comments
 (0)