reth_storage_api

Trait StageCheckpointReader

Source
pub trait StageCheckpointReader: Send + Sync {
    // Required methods
    fn get_stage_checkpoint(
        &self,
        id: StageId,
    ) -> ProviderResult<Option<StageCheckpoint>>;
    fn get_stage_checkpoint_progress(
        &self,
        id: StageId,
    ) -> ProviderResult<Option<Vec<u8>>>;
    fn get_all_checkpoints(
        &self,
    ) -> ProviderResult<Vec<(String, StageCheckpoint)>>;
}
Expand description

The trait for fetching stage checkpoint related data.

Required Methods§

Source

fn get_stage_checkpoint( &self, id: StageId, ) -> ProviderResult<Option<StageCheckpoint>>

Fetch the checkpoint for the given stage.

Source

fn get_stage_checkpoint_progress( &self, id: StageId, ) -> ProviderResult<Option<Vec<u8>>>

Get stage checkpoint progress.

Source

fn get_all_checkpoints(&self) -> ProviderResult<Vec<(String, StageCheckpoint)>>

Reads all stage checkpoints and returns a list with the name of the stage and the checkpoint data.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + StageCheckpointReader + ?Sized> StageCheckpointReader for &'a T
where &'a T: Send + Sync,

Source§

impl<T: StageCheckpointReader + ?Sized> StageCheckpointReader for Arc<T>
where Arc<T>: Send + Sync,

Implementors§

Source§

impl<C: Send + Sync, N: NodePrimitives> StageCheckpointReader for NoopProvider<C, N>