fix: set first block at the beginning of batch execution (#10302)

This commit is contained in:
joshieDo
2024-08-14 19:56:36 +01:00
committed by GitHub
parent 89c0c0f0ce
commit 418e2235d7
2 changed files with 10 additions and 8 deletions

View File

@ -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(())
}