Skip to content

Commit

Permalink
refactor(blockifier_reexecution): add chain ID to SerializableOffline…
Browse files Browse the repository at this point in the history
…ReexecutionData
  • Loading branch information
dorimedini-starkware committed Nov 12, 2024
1 parent c4b1621 commit a4d664b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/blockifier_reexecution/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ fn main() {
SerializableOfflineReexecutionData {
serializable_data_prev_block,
serializable_data_next_block,
chain_id: ChainId::Mainnet,
old_block_hash,
}
.write_to_file(&full_file_path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,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,
}

Expand Down Expand Up @@ -116,6 +117,7 @@ impl From<SerializableOfflineReexecutionData> for OfflineReexecutionData {
transactions_next_block,
state_diff_next_block,
},
chain_id,
old_block_hash,
} = value;

Expand All @@ -131,7 +133,7 @@ impl From<SerializableOfflineReexecutionData> 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(),
),
Expand Down

0 comments on commit a4d664b

Please sign in to comment.