diff --git a/crates/blockifier_reexecution/src/state_reader/test_state_reader.rs b/crates/blockifier_reexecution/src/state_reader/test_state_reader.rs index ab2f23337d..5362a6ef63 100644 --- a/crates/blockifier_reexecution/src/state_reader/test_state_reader.rs +++ b/crates/blockifier_reexecution/src/state_reader/test_state_reader.rs @@ -85,6 +85,7 @@ pub struct SerializableDataPrevBlock { pub struct SerializableOfflineReexecutionData { pub serializable_data_prev_block: SerializableDataPrevBlock, pub serializable_data_next_block: SerializableDataNextBlock, + pub chain_id: ChainId, pub old_block_hash: BlockHash, } @@ -119,6 +120,7 @@ impl From for OfflineReexecutionData { state_diff_next_block, declared_classes, }, + chain_id, old_block_hash, } = value; @@ -138,7 +140,7 @@ impl From for OfflineReexecutionData { offline_state_reader_prev_block, block_context_next_block: BlockContext::new( block_info_next_block, - get_chain_info(&ChainId::Mainnet), + get_chain_info(&chain_id), VersionedConstants::get(&starknet_version).unwrap().clone(), BouncerConfig::max(), ), diff --git a/crates/blockifier_reexecution/src/state_reader/utils.rs b/crates/blockifier_reexecution/src/state_reader/utils.rs index 90e07ef6f7..342c8a7cfc 100644 --- a/crates/blockifier_reexecution/src/state_reader/utils.rs +++ b/crates/blockifier_reexecution/src/state_reader/utils.rs @@ -252,7 +252,7 @@ pub fn write_block_reexecution_data_to_file( let consecutive_state_readers = ConsecutiveTestStateReaders::new( block_number.prev().expect("Should not run with block 0"), Some(config), - chain_id, + chain_id.clone(), true, ); @@ -272,6 +272,7 @@ pub fn write_block_reexecution_data_to_file( SerializableOfflineReexecutionData { serializable_data_prev_block, serializable_data_next_block, + chain_id, old_block_hash, } .write_to_file(&full_file_path)