chore: introduce ExecuteOutput (#11929)

This commit is contained in:
Federico Gimenez
2024-10-21 14:34:23 +02:00
committed by GitHub
parent f25cceb9f9
commit 7119bb1fe0
3 changed files with 29 additions and 15 deletions

View File

@ -14,7 +14,7 @@ use reth_ethereum_consensus::validate_block_post_execution;
use reth_evm::{
execute::{
BasicBlockExecutorProvider, BlockExecutionError, BlockExecutionStrategy,
BlockExecutionStrategyFactory, BlockValidationError, ProviderError,
BlockExecutionStrategyFactory, BlockValidationError, ExecuteOutput, ProviderError,
},
state_change::post_block_balance_increments,
system_calls::{OnStateHook, SystemCaller},
@ -152,7 +152,7 @@ where
&mut self,
block: &BlockWithSenders,
total_difficulty: U256,
) -> Result<(Vec<Receipt>, u64), Self::Error> {
) -> Result<ExecuteOutput, Self::Error> {
let env = self.evm_env_for_block(&block.header, total_difficulty);
let mut evm = self.evm_config.evm_with_env(&mut self.state, env);
@ -203,7 +203,7 @@ where
},
);
}
Ok((receipts, cumulative_gas_used))
Ok(ExecuteOutput { receipts, gas_used: cumulative_gas_used })
}
fn apply_post_execution_changes(