pub struct Service { /* private fields */ }
Expand description

SnapshotService implementation. This controls taking snapshots and restoring from them.

Implementations

Create a new snapshot service from the given parameters.

Get a reference to the snapshot reader.

Tick the snapshot service. This will log any active snapshot being taken.

Take a snapshot at the block with the given number. calling this while a restoration is in progress or vice versa will lead to a race condition where the first one to finish will have their produced snapshot overwritten.

Initialize the restoration synchronously. The recover flag indicates whether to recover the restored snapshot.

Feed a state chunk to be processed synchronously.

Feed a block chunk to be processed synchronously.

Trait Implementations

Executes the destructor for this type. Read more

Query the most recent manifest data.

Query the most recent snapshoted block number and hash.

Get the supported range of snapshot version numbers. None indicates warp sync isn’t supported by the consensus engine. Read more

Get raw chunk for a given hash.

Returns a list of the completed chunks

Ask the snapshot service for the creation status.

Ask the snapshot service for the restoration status.

Begin snapshot restoration. If restoration in-progress, this will reset it. From this point on, any previous snapshot may become unavailable. Read more

Abort an in-progress restoration if there is one.

Feed a raw state chunk to the service to be processed asynchronously. no-op if not currently restoring. Read more

Feed a raw block chunk to the service to be processed asynchronously. no-op if currently restoring. Read more

Abort in-progress snapshotting if there is one.

Shutdown the Snapshot Service by aborting any ongoing restore

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.