diff --git a/crates/ethereum/evm/src/execute.rs b/crates/ethereum/evm/src/execute.rs index 1c2d9fd9cb..d0d3414cb6 100644 --- a/crates/ethereum/evm/src/execute.rs +++ b/crates/ethereum/evm/src/execute.rs @@ -418,6 +418,11 @@ where fn execute_and_verify_one(&mut self, input: Self::Input<'_>) -> Result<(), Self::Error> { let BlockExecutionInput { block, total_difficulty } = input; + + if self.batch_record.first_block().is_none() { + self.batch_record.set_first_block(block.number); + } + let EthExecuteOutput { receipts, requests, gas_used: _ } = self.executor.execute_without_verification(block, total_difficulty)?; @@ -433,10 +438,6 @@ where // store requests in the set self.batch_record.save_requests(requests); - if self.batch_record.first_block().is_none() { - self.batch_record.set_first_block(block.number); - } - Ok(()) } diff --git a/crates/optimism/evm/src/execute.rs b/crates/optimism/evm/src/execute.rs index 5f9e796357..8d800778d7 100644 --- a/crates/optimism/evm/src/execute.rs +++ b/crates/optimism/evm/src/execute.rs @@ -396,6 +396,11 @@ where fn execute_and_verify_one(&mut self, input: Self::Input<'_>) -> Result<(), Self::Error> { let BlockExecutionInput { block, total_difficulty } = input; + + if self.batch_record.first_block().is_none() { + self.batch_record.set_first_block(block.number); + } + let (receipts, _gas_used) = self.executor.execute_without_verification(block, total_difficulty)?; @@ -408,10 +413,6 @@ where // store receipts in the set self.batch_record.save_receipts(receipts)?; - if self.batch_record.first_block().is_none() { - self.batch_record.set_first_block(block.number); - } - Ok(()) }