1use alloy_rpc_types_engine::ForkchoiceState;
2use reth_primitives_traits::SealedHeader;
34/// A type that can track updates related to fork choice updates.
5pub trait CanonChainTracker: Send + Sync {
6/// The header type.
7type Header: Send + Sync;
89/// Notify the tracker about a received fork choice update.
10fn on_forkchoice_update_received(&self, update: &ForkchoiceState);
1112/// Returns the last time a fork choice update was received from the CL
13 /// ([`CanonChainTracker::on_forkchoice_update_received`])
14#[cfg(feature = "std")]
15fn last_received_update_timestamp(&self) -> Option<std::time::Instant>;
1617/// Sets the canonical head of the chain.
18fn set_canonical_head(&self, header: SealedHeader<Self::Header>);
1920/// Sets the safe block of the chain.
21fn set_safe(&self, header: SealedHeader<Self::Header>);
2223/// Sets the finalized block of the chain.
24fn set_finalized(&self, header: SealedHeader<Self::Header>);
25}