From aae712244a342958ef8f6d28a35d5d1fbbcb6ed5 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:53:23 -0400 Subject: [PATCH] fix: Prevent excessive file crawling when syncing the first block --- bin/reth/src/block_ingest.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/reth/src/block_ingest.rs b/bin/reth/src/block_ingest.rs index 03e67ea0e..a259cb29e 100644 --- a/bin/reth/src/block_ingest.rs +++ b/bin/reth/src/block_ingest.rs @@ -275,6 +275,7 @@ impl BlockIngest { let engine_api = node.auth_server_handle().http_client(); let mut evm_map = erc20_contract_to_spot_token(node.chain_spec().chain_id()).await?; + const MINIMUM_TIMESTAMP: u64 = 1739849780; let current_block_timestamp: u64 = provider .block_by_number(head) .expect("Failed to fetch current block in db") @@ -282,6 +283,8 @@ impl BlockIngest { .into_header() .timestamp(); + let current_block_timestamp = current_block_timestamp.max(MINIMUM_TIMESTAMP); + info!("Current height {height}, timestamp {current_block_timestamp}"); self.start_local_ingest_loop(height, current_block_timestamp).await;