Skip to content

Commit b925bae

Browse files
chore(blockifier): remove fn into_keys, fn keys is used instead, created
in PR #3580
1 parent 5f253a6 commit b925bae

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

crates/blockifier/src/bouncer_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ fn test_bouncer_try_update(#[case] added_ecdsa: usize, #[case] scenario: &'stati
257257
..Default::default()
258258
};
259259
let tx_state_changes_keys =
260-
transactional_state.get_actual_state_changes().unwrap().state_maps.into_keys();
260+
transactional_state.get_actual_state_changes().unwrap().state_maps.keys();
261261

262262
// TODO(Yoni, 1/10/2024): simplify this test and move tx-too-large cases out.
263263

crates/blockifier/src/state/cached_state.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -355,16 +355,6 @@ impl StateMaps {
355355
modified_contracts
356356
}
357357

358-
pub fn into_keys(self) -> StateChangesKeys {
359-
StateChangesKeys {
360-
modified_contracts: self.get_contract_addresses(),
361-
nonce_keys: self.nonces.into_keys().collect(),
362-
class_hash_keys: self.class_hashes.into_keys().collect(),
363-
storage_keys: self.storage.into_keys().collect(),
364-
compiled_class_hash_keys: self.compiled_class_hashes.into_keys().collect(),
365-
}
366-
}
367-
368358
pub fn keys(&self) -> StateChangesKeys {
369359
StateChangesKeys {
370360
modified_contracts: self.get_contract_addresses(),

crates/blockifier/src/state/cached_state_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ fn test_contract_cache_is_used() {
547547
#[test]
548548
fn test_cache_get_write_keys() {
549549
// Trivial case.
550-
assert_eq!(StateMaps::default().into_keys(), StateChangesKeys::default());
550+
assert_eq!(StateMaps::default().keys(), StateChangesKeys::default());
551551

552552
// Interesting case.
553553
let some_felt = felt!("0x1");
@@ -592,7 +592,7 @@ fn test_cache_get_write_keys() {
592592
]),
593593
};
594594

595-
assert_eq!(state_maps.into_keys(), expected_keys);
595+
assert_eq!(state_maps.keys(), expected_keys);
596596
}
597597

598598
#[test]

crates/blockifier/src/transaction/transaction_execution.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ impl<U: UpdatableState> ExecutableTransaction<U> for Transaction {
208208
// Check if the transaction is too large to fit any block.
209209
// TODO(Yoni, 1/8/2024): consider caching these two.
210210
let tx_execution_summary = tx_execution_info.summarize(&block_context.versioned_constants);
211-
let mut tx_state_changes_keys = state.get_actual_state_changes()?.state_maps.into_keys();
211+
let mut tx_state_changes_keys = state.get_actual_state_changes()?.state_maps.keys();
212212
tx_state_changes_keys.update_sequencer_key_in_storage(
213213
&block_context.to_tx_context(self),
214214
&tx_execution_info,

0 commit comments

Comments
 (0)