reth::providers

Trait StageCheckpointWriter

pub trait StageCheckpointWriter: Send + Sync {
    // Required methods
    fn save_stage_checkpoint(
        &self,
        id: StageId,
        checkpoint: StageCheckpoint,
    ) -> Result<(), ProviderError>;
    fn save_stage_checkpoint_progress(
        &self,
        id: StageId,
        checkpoint: Vec<u8>,
    ) -> Result<(), ProviderError>;
    fn update_pipeline_stages(
        &self,
        block_number: u64,
        drop_stage_checkpoint: bool,
    ) -> Result<(), ProviderError>;
}
Expand description

The trait for updating stage checkpoint related data.

Required Methods§

fn save_stage_checkpoint( &self, id: StageId, checkpoint: StageCheckpoint, ) -> Result<(), ProviderError>

Save stage checkpoint.

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

Save stage checkpoint progress.

fn update_pipeline_stages( &self, block_number: u64, drop_stage_checkpoint: bool, ) -> Result<(), ProviderError>

Update all pipeline sync stage progress.

Implementations on Foreign Types§

§

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

§

fn save_stage_checkpoint( &self, id: StageId, checkpoint: StageCheckpoint, ) -> Result<(), ProviderError>

§

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

§

fn update_pipeline_stages( &self, block_number: u64, drop_stage_checkpoint: bool, ) -> Result<(), ProviderError>

§

impl<T> StageCheckpointWriter for Arc<T>

§

fn save_stage_checkpoint( &self, id: StageId, checkpoint: StageCheckpoint, ) -> Result<(), ProviderError>

§

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

§

fn update_pipeline_stages( &self, block_number: u64, drop_stage_checkpoint: bool, ) -> Result<(), ProviderError>

Implementors§

Source§

impl<TX, N> StageCheckpointWriter for DatabaseProvider<TX, N>
where TX: DbTxMut, N: NodeTypes,