From 89b0a44a7794f64fa637a7995b0cdcaf87f0306c Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Tue, 26 May 2026 22:43:28 +0800 Subject: [PATCH] fix(statetest): default omitted excess_blob_gas on block headers Blockchain tests sometimes omit excess_blob_gas on non-genesis headers. Use zero like genesis handling so parent_excess_blob_gas updates every block instead of retaining the previous fork value. --- crates/revmc-statetest/src/btest/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/revmc-statetest/src/btest/mod.rs b/crates/revmc-statetest/src/btest/mod.rs index db203da6e..3ff662d67 100644 --- a/crates/revmc-statetest/src/btest/mod.rs +++ b/crates/revmc-statetest/src/btest/mod.rs @@ -629,11 +629,12 @@ fn execute_blockchain_test( if let Some(block_header) = block.block_header.as_ref() { block_hash = Some(block_header.hash); beacon_root = block_header.parent_beacon_block_root; + let this_excess = block_header.excess_blob_gas.unwrap_or_default().to::(); block_env = block_header.to_block_env(Some(BlobExcessGasAndPrice::new_with_spec( parent_excess_blob_gas, spec_id, ))); - this_excess_blob_gas = block_header.excess_blob_gas.map(|i| i.to::()); + this_excess_blob_gas = Some(this_excess); } else { this_excess_blob_gas = None; }