Trait ethcore::snapshot::Rebuilder[][src]

pub trait Rebuilder: Send {
    fn feed(
        &mut self,
        chunk: &[u8],
        engine: &EthEngine,
        abort_flag: &AtomicBool
    ) -> Result<(), Error>;
fn finalize(&mut self, engine: &EthEngine) -> Result<(), Error>; }

Restore from secondary snapshot chunks.

Required Methods

Feed a chunk, potentially out of order.

Check abort_flag periodically while doing heavy work. If set to false, should bail with Error::RestorationAborted.

Finalize the restoration. Will be done after all chunks have been fed successfully.

This should apply the necessary "glue" between chunks, and verify against the restored state.

Implementors