Trait vapcore_snapshot::SnapshotComponents [−][src]
Components necessary for snapshot creation and restoration.
Required methods
fn chunk_all(
&mut self,
chain: &BlockChain,
block_at: H256,
chunk_sink: &mut ChunkSink<'_>,
progress: &RwLock<Progress>,
preferred_size: usize
) -> Result<(), SnapshotError>
[src]
&mut self,
chain: &BlockChain,
block_at: H256,
chunk_sink: &mut ChunkSink<'_>,
progress: &RwLock<Progress>,
preferred_size: usize
) -> Result<(), SnapshotError>
Create secondary snapshot chunks; these corroborate the state data in the state chunks.
Chunks shouldn’t exceed the given preferred size, and should be fed uncompressed into the sink.
This will vary by consensus engine, so it’s exposed as a trait.
fn rebuilder(
&self,
chain: BlockChain,
db: Arc<dyn BlockChainDB>,
manifest: &ManifestData
) -> Result<Box<dyn Rebuilder>, Error>
[src]
&self,
chain: BlockChain,
db: Arc<dyn BlockChainDB>,
manifest: &ManifestData
) -> Result<Box<dyn Rebuilder>, Error>
Create a rebuilder, which will have chunks fed into it in arbitrary order and then be finalized.
The manifest, a database, and fresh BlockChain
are supplied.
The engine passed to the Rebuilder
methods will be the same instance
that created the SnapshotComponents
.
fn min_supported_version(&self) -> u64
[src]
Minimum supported snapshot version number.
fn current_version(&self) -> u64
[src]
Current version number
Implementors
impl SnapshotComponents for PoaSnapshot
[src]
fn chunk_all(
&mut self,
chain: &BlockChain,
block_at: H256,
sink: &mut ChunkSink<'_>,
_progress: &RwLock<Progress>,
preferred_size: usize
) -> Result<(), SnapshotError>
[src]
&mut self,
chain: &BlockChain,
block_at: H256,
sink: &mut ChunkSink<'_>,
_progress: &RwLock<Progress>,
preferred_size: usize
) -> Result<(), SnapshotError>
fn rebuilder(
&self,
chain: BlockChain,
db: Arc<dyn BlockChainDB>,
manifest: &ManifestData
) -> Result<Box<dyn Rebuilder>, VapcoreError>
[src]
&self,
chain: BlockChain,
db: Arc<dyn BlockChainDB>,
manifest: &ManifestData
) -> Result<Box<dyn Rebuilder>, VapcoreError>
fn min_supported_version(&self) -> u64
[src]
fn current_version(&self) -> u64
[src]
impl SnapshotComponents for PowSnapshot
[src]
fn chunk_all(
&mut self,
chain: &BlockChain,
block_at: H256,
chunk_sink: &mut ChunkSink<'_>,
progress: &RwLock<Progress>,
preferred_size: usize
) -> Result<(), SnapshotError>
[src]
&mut self,
chain: &BlockChain,
block_at: H256,
chunk_sink: &mut ChunkSink<'_>,
progress: &RwLock<Progress>,
preferred_size: usize
) -> Result<(), SnapshotError>
fn rebuilder(
&self,
chain: BlockChain,
db: Arc<dyn BlockChainDB>,
manifest: &ManifestData
) -> Result<Box<dyn Rebuilder>, VapcoreError>
[src]
&self,
chain: BlockChain,
db: Arc<dyn BlockChainDB>,
manifest: &ManifestData
) -> Result<Box<dyn Rebuilder>, VapcoreError>