diff --git a/crates/engine/primitives/src/event.rs b/crates/engine/primitives/src/event.rs index f5bd56ce1a81e..f4471dd8c8925 100644 --- a/crates/engine/primitives/src/event.rs +++ b/crates/engine/primitives/src/event.rs @@ -9,7 +9,7 @@ use core::{ fmt::{Display, Formatter, Result}, time::Duration, }; -use reth_chain_state::ExecutedBlock; +use reth_chain_state::ExecutedBlockWithTrieUpdates; use reth_primitives::EthPrimitives; use reth_primitives_traits::{NodePrimitives, SealedHeader}; @@ -19,9 +19,9 @@ pub enum BeaconConsensusEngineEvent { /// The fork choice state was updated, and the current fork choice status ForkchoiceUpdated(ForkchoiceState, ForkchoiceStatus), /// A block was added to the fork chain. - ForkBlockAdded(ExecutedBlock, Duration), + ForkBlockAdded(ExecutedBlockWithTrieUpdates, Duration), /// A block was added to the canonical chain, and the elapsed time validating the block - CanonicalBlockAdded(ExecutedBlock, Duration), + CanonicalBlockAdded(ExecutedBlockWithTrieUpdates, Duration), /// A canonical chain was committed, and the elapsed time committing the data CanonicalChainCommitted(Box>, Duration), /// The consensus engine is involved in live sync, and has specific progress diff --git a/crates/engine/tree/src/tree/mod.rs b/crates/engine/tree/src/tree/mod.rs index 9d550c52c8941..8da382cd000c0 100644 --- a/crates/engine/tree/src/tree/mod.rs +++ b/crates/engine/tree/src/tree/mod.rs @@ -1395,10 +1395,7 @@ where self.state.tree_state.insert_executed(block.clone()); self.metrics.engine.inserted_already_executed_blocks.increment(1); self.emit_event(EngineApiEvent::BeaconConsensus( - BeaconConsensusEngineEvent::CanonicalBlockAdded( - block.block, - now.elapsed(), - ), + BeaconConsensusEngineEvent::CanonicalBlockAdded(block, now.elapsed()), )); } EngineApiRequest::Beacon(request) => { @@ -2643,9 +2640,9 @@ where // emit insert event let elapsed = start.elapsed(); let engine_event = if self.is_fork(block_num_hash.hash)? { - BeaconConsensusEngineEvent::ForkBlockAdded(executed.block, elapsed) + BeaconConsensusEngineEvent::ForkBlockAdded(executed, elapsed) } else { - BeaconConsensusEngineEvent::CanonicalBlockAdded(executed.block, elapsed) + BeaconConsensusEngineEvent::CanonicalBlockAdded(executed, elapsed) }; self.emit_event(EngineApiEvent::BeaconConsensus(engine_event));