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 on_transition_configuration_exchanged(&self);
fn last_exchanged_transition_configuration_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>
fn last_received_update_timestamp(&self) -> Option<Instant>
Returns the last time a fork choice update was received from the CL
(CanonChainTracker::on_forkchoice_update_received
)
Sourcefn on_transition_configuration_exchanged(&self)
fn on_transition_configuration_exchanged(&self)
Notify the tracker about a transition configuration exchange.
Sourcefn last_exchanged_transition_configuration_timestamp(&self) -> Option<Instant>
fn last_exchanged_transition_configuration_timestamp(&self) -> Option<Instant>
Returns the last time a transition configuration was exchanged with the CL
(CanonChainTracker::on_transition_configuration_exchanged
)
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.