diff --git a/src/processor/snapshot/mod.rs b/src/processor/snapshot/mod.rs index 154e2f3..b2c7ecb 100644 --- a/src/processor/snapshot/mod.rs +++ b/src/processor/snapshot/mod.rs @@ -9,7 +9,7 @@ use async_trait::async_trait; use ethers::types::{Address, H256, U256, U64}; use eyre::Result; use state_reconstruct_fetcher::{ - constants::{ethereum, storage, zksync::L2_BLOCK_NUMBER_ADDRESSES}, + constants::{storage, zksync::L2_BLOCK_NUMBER_ADDRESSES}, types::CommitBlock, }; use state_reconstruct_storage::{ @@ -74,9 +74,7 @@ impl Processor for SnapshotBuilder { .insert_storage_log(&mut SnapshotStorageLog { key: *key, value, - l1_batch_number_of_initial_write: U64::from( - block.l1_block_number.unwrap_or(0), - ), + l1_batch_number_of_initial_write: U64::from(block.l1_batch_number), enumeration_index: 0, }) .expect("failed to insert storage_log_entry"); @@ -226,7 +224,7 @@ fn reconstruct_genesis_state(database: &mut SnapshotDatabase, path: &str) -> Res database.insert_storage_log(&mut SnapshotStorageLog { key, value, - l1_batch_number_of_initial_write: U64::from(ethereum::GENESIS_BLOCK), + l1_batch_number_of_initial_write: U64::from(0), enumeration_index: 0, })?; }