Skip to content

Commit

Permalink
fix: pr concerns
Browse files Browse the repository at this point in the history
  • Loading branch information
KolbyML committed Sep 2, 2024
1 parent a98fef1 commit b7b0d56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions trin-execution/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf>, config: StateConfig) -> anyhow::Result<Self> {
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion trin-execution/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use clap::Parser;

use e2store::era1::BLOCK_TUPLE_COUNT;
use revm_primitives::SpecId;
use tracing::info;
use trin_execution::{
Expand Down

0 comments on commit b7b0d56

Please sign in to comment.