Trait StageCheckpointReader

pub trait StageCheckpointReader: Send + Sync {
    // Required methods
    fn get_stage_checkpoint(
        &self,
        id: StageId,
    ) -> Result<Option<StageCheckpoint>, ProviderError>;
    fn get_stage_checkpoint_progress(
        &self,
        id: StageId,
    ) -> Result<Option<Vec<u8>>, ProviderError>;
    fn get_all_checkpoints(
        &self,
    ) -> Result<Vec<(String, StageCheckpoint)>, ProviderError>;
}
Available on crate feature provider only.
Expand description

The trait for fetching stage checkpoint related data.

Required Methods§

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

Fetch the checkpoint for the given stage.

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

Get stage checkpoint progress.

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

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

Implementations on Foreign Types§

§

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

§

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

§

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

§

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

§

impl<T> StageCheckpointReader for Arc<T>

§

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

§

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

§

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

Implementors§

§

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

§

impl<N> StageCheckpointReader for BlockchainProvider<N>

§

impl<N> StageCheckpointReader for ProviderFactory<N>

§

impl<T, ChainSpec> StageCheckpointReader for MockEthProvider<T, ChainSpec>
where T: Transaction, ChainSpec: EthChainSpec,

§

impl<TX, N> StageCheckpointReader for DatabaseProvider<TX, N>
where TX: DbTx, N: NodeTypes,