diff --git a/crates/engine/tree/src/tree/mod.rs b/crates/engine/tree/src/tree/mod.rs index a1817a5a888e9..1664b00c5faeb 100644 --- a/crates/engine/tree/src/tree/mod.rs +++ b/crates/engine/tree/src/tree/mod.rs @@ -48,11 +48,11 @@ use reth_revm::database::StateProviderDatabase; use reth_stages_api::ControlFlow; use reth_trie::{ updates::{StorageTrieUpdates, TrieUpdates}, - HashedPostState, Nibbles, TrieInput, + Nibbles, TrieInput, }; use reth_trie_parallel::root::{ParallelStateRoot, ParallelStateRootError}; use revm_primitives::EvmState; -use root::{StateRootConfig, StateRootMessage, StateRootTask}; +use root::{StateHookSender, StateRootConfig, StateRootMessage, StateRootTask}; use std::{ cmp::Ordering, collections::{btree_map, hash_map, BTreeMap, VecDeque}, @@ -2234,8 +2234,9 @@ where let state_root_task = StateRootTask::new(state_root_config, state_root_tx.clone(), state_root_rx); let state_root_handle = state_root_task.spawn(); + let state_hook_sender = StateHookSender::new(state_root_tx); let state_hook = move |state: &EvmState| { - let _ = state_root_tx.send(StateRootMessage::StateUpdate(state.clone())); + let _ = state_hook_sender.send(StateRootMessage::StateUpdate(state.clone())); }; let output = self.metrics.executor.execute_metered( @@ -2836,7 +2837,7 @@ mod tests { use reth_primitives::{BlockExt, EthPrimitives}; use reth_provider::test_utils::MockEthProvider; use reth_rpc_types_compat::engine::{block_to_payload_v1, payload::block_to_payload_v3}; - use reth_trie::updates::TrieUpdates; + use reth_trie::{updates::TrieUpdates, HashedPostState}; use std::{ str::FromStr, sync::mpsc::{channel, Sender},