Trait ethcore::snapshot::SnapshotService [] [src]

pub trait SnapshotService: Sync + Send {
    fn manifest(&self) -> Option<ManifestData>;
    fn chunk(&self, hash: H256) -> Option<Bytes>;
    fn status(&self) -> RestorationStatus;
    fn begin_restore(&self, manifest: ManifestData);
    fn abort_restore(&self);
    fn restore_state_chunk(&self, hash: H256, chunk: Bytes);
    fn restore_block_chunk(&self, hash: H256, chunk: Bytes);
    fn provide_canon_hashes(&self, canonical: &[(u64, H256)]);
}

The interface for a snapshot network service. This handles: - restoration of snapshots to temporary databases. - responding to queries for snapshot manifests and chunks

Required Methods

Query the most recent manifest data.

Get raw chunk for a given hash.

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.

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.

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

Give the restoration in-progress some canonical block hashes for extra verification (performed at the end)

Trait Implementations

impl IpcConfig for SnapshotService
[src]

Current service api version Should be increased if any of the methods changes signature Read more

Current ipc protocol version Should be increased only if signature of system methods changes Read more

Default handshake requires exact versions match

Implementors