mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: set first block at the beginning of batch execution (#10302)
This commit is contained in:
@ -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(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user