Trait reth_storage_api::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§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§