From b7b0d56ff12f7927e688221a22d24af55c059674 Mon Sep 17 00:00:00 2001 From: Kolby Moroz Liebl <31669092+KolbyML@users.noreply.github.com> Date: Mon, 2 Sep 2024 00:54:01 -0600 Subject: [PATCH] fix: pr concerns --- trin-execution/src/execution.rs | 5 +++-- trin-execution/src/main.rs | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/trin-execution/src/execution.rs b/trin-execution/src/execution.rs index f61491c156..7728c0ab1f 100644 --- a/trin-execution/src/execution.rs +++ b/trin-execution/src/execution.rs @@ -70,6 +70,7 @@ pub struct State { const GENESIS_STATE_FILE: &str = "trin-execution/resources/genesis/mainnet.json"; const TEST_GENESIS_STATE_FILE: &str = "resources/genesis/mainnet.json"; +const BLOCKHASH_SERVE_WINDOW: u64 = 256; impl State { pub async fn new(path: Option, config: StateConfig) -> anyhow::Result { @@ -180,9 +181,9 @@ impl State { keccak256(B256::from(U256::from(block.header.number))), block.header.hash(), )?; - if block.header.number >= 8192 { + if block.header.number >= BLOCKHASH_SERVE_WINDOW { self.database.db.delete(keccak256(B256::from(U256::from( - block.header.number - 8192, + block.header.number - BLOCKHASH_SERVE_WINDOW, ))))?; } stop_timer(timer); diff --git a/trin-execution/src/main.rs b/trin-execution/src/main.rs index fd3760e275..5ad3370bd1 100644 --- a/trin-execution/src/main.rs +++ b/trin-execution/src/main.rs @@ -1,6 +1,5 @@ use clap::Parser; -use e2store::era1::BLOCK_TUPLE_COUNT; use revm_primitives::SpecId; use tracing::info; use trin_execution::{