mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-27 16:18:08 -05: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(())
|
||||
}
|
||||
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user