pub trait CanonChainTracker: Send + Sync {
type Header: Send + Sync;
// Required methods
fn on_forkchoice_update_received(&self, update: &ForkchoiceState);
fn last_received_update_timestamp(&self) -> Option<Instant>;
fn set_canonical_head(&self, header: SealedHeader<Self::Header>);
fn set_safe(&self, header: SealedHeader<Self::Header>);
fn set_finalized(&self, header: SealedHeader<Self::Header>);
}
Expand description
A type that can track updates related to fork choice updates.
Required Associated Types§
Required Methods§
Sourcefn on_forkchoice_update_received(&self, update: &ForkchoiceState)
fn on_forkchoice_update_received(&self, update: &ForkchoiceState)
Notify the tracker about a received fork choice update.
Sourcefn last_received_update_timestamp(&self) -> Option<Instant>
Available on crate feature std
only.
fn last_received_update_timestamp(&self) -> Option<Instant>
std
only.Returns the last time a fork choice update was received from the CL
(CanonChainTracker::on_forkchoice_update_received
)
Sourcefn set_canonical_head(&self, header: SealedHeader<Self::Header>)
fn set_canonical_head(&self, header: SealedHeader<Self::Header>)
Sets the canonical head of the chain.
Sourcefn set_finalized(&self, header: SealedHeader<Self::Header>)
fn set_finalized(&self, header: SealedHeader<Self::Header>)
Sets the finalized block of the chain.