mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat: update SystemCaller (#11718)
This commit is contained in:
@ -121,10 +121,12 @@ where
|
||||
) -> Result<(Vec<Receipt>, u64), BlockExecutionError>
|
||||
where
|
||||
DB: Database<Error: Into<ProviderError> + Display>,
|
||||
F: OnStateHook,
|
||||
F: OnStateHook + 'static,
|
||||
{
|
||||
let mut system_caller =
|
||||
SystemCaller::new(&self.evm_config, &self.chain_spec).with_state_hook(state_hook);
|
||||
let mut system_caller = SystemCaller::new(self.evm_config.clone(), &self.chain_spec);
|
||||
if let Some(hook) = state_hook {
|
||||
system_caller.with_state_hook(Some(Box::new(hook) as Box<dyn OnStateHook>));
|
||||
}
|
||||
|
||||
// apply pre execution changes
|
||||
system_caller.apply_beacon_root_contract_call(
|
||||
@ -306,7 +308,7 @@ where
|
||||
state_hook: Option<F>,
|
||||
) -> Result<(Vec<Receipt>, u64), BlockExecutionError>
|
||||
where
|
||||
F: OnStateHook,
|
||||
F: OnStateHook + 'static,
|
||||
{
|
||||
// 1. prepare state on new block
|
||||
self.on_new_block(&block.header);
|
||||
@ -410,7 +412,7 @@ where
|
||||
state_hook: F,
|
||||
) -> Result<Self::Output, Self::Error>
|
||||
where
|
||||
F: OnStateHook,
|
||||
F: OnStateHook + 'static,
|
||||
{
|
||||
let BlockExecutionInput { block, total_difficulty } = input;
|
||||
let (receipts, gas_used) = self.execute_without_verification_with_state_hook(
|
||||
|
||||
Reference in New Issue
Block a user