Skip to main content

BackfillSyncBuilder

Trait BackfillSyncBuilder 

Source
pub trait BackfillSyncBuilder<N: ProviderNodeTypes, C>: Send {
    type Backfill: BackfillSync + Unpin + 'static;

    // Required method
    fn build(self, ctx: BackfillContext<N, C>) -> Result<Self::Backfill>;

    // Provided method
    fn recover(&mut self, _provider_factory: &ProviderFactory<N>) -> Result<()> { ... }
}
Expand description

Builds the BackfillSync the engine hands long-range sync to.

Nodes pick one with EngineNodeLauncher::with_backfill; the default is PipelineBackfill.

Required Associated Types§

Source

type Backfill: BackfillSync + Unpin + 'static

The backfill this builder produces.

Required Methods§

Source

fn build(self, ctx: BackfillContext<N, C>) -> Result<Self::Backfill>

Builds the backfill from the node’s staged pipeline, block client and database.

Provided Methods§

Source

fn recover(&mut self, _provider_factory: &ProviderFactory<N>) -> Result<()>

Recovers from an earlier run that stopped mid-write, before the node checks the database for consistency. A backfill that commits static files and the database separately uses it so a crash between the two isn’t treated as corruption. Does nothing by default.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§