diff --git a/bins/revme/src/cmd/blockchaintest.rs b/bins/revme/src/cmd/blockchaintest.rs index cba7267361..9a5d52b747 100644 --- a/bins/revme/src/cmd/blockchaintest.rs +++ b/bins/revme/src/cmd/blockchaintest.rs @@ -673,6 +673,11 @@ fn execute_blockchain_test( state.insert_account_with_storage(address, account_info, account.storage); } + // insert genesis hash + state + .block_hashes + .insert(0, test_case.genesis_block_header.hash); + // Setup configuration based on fork let spec_id = fork_to_spec_id(test_case.network); let mut cfg = CfgEnv::default(); @@ -916,6 +921,11 @@ fn execute_blockchain_test( spec_id, ); + // insert present block hash. + state + .block_hashes + .insert(block_env.number.to::(), block_hash.unwrap_or_default()); + parent_block_hash = block_hash; if let Some(excess_blob_gas) = this_excess_blob_gas { parent_excess_blob_gas = excess_blob_gas;