Struct ethcore::snapshot::PowSnapshot
source · [−]Expand description
Snapshot creation and restoration for PoW chains. This includes blocks from the head of the chain as a loose assurance that the chain is valid.
Fields
blocks: u64
Number of blocks from the head of the chain to include in the snapshot.
max_restore_blocks: u64
Number of to allow in the snapshot when restoring.
Implementations
sourceimpl PowSnapshot
impl PowSnapshot
sourcepub fn new(blocks: u64, max_restore_blocks: u64) -> PowSnapshot
pub fn new(blocks: u64, max_restore_blocks: u64) -> PowSnapshot
Create a new instance.
Trait Implementations
sourceimpl Clone for PowSnapshot
impl Clone for PowSnapshot
sourcefn clone(&self) -> PowSnapshot
fn clone(&self) -> PowSnapshot
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl PartialEq<PowSnapshot> for PowSnapshot
impl PartialEq<PowSnapshot> for PowSnapshot
sourcefn eq(&self, other: &PowSnapshot) -> bool
fn eq(&self, other: &PowSnapshot) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PowSnapshot) -> bool
fn ne(&self, other: &PowSnapshot) -> bool
This method tests for !=
.
sourceimpl SnapshotComponents for PowSnapshot
impl SnapshotComponents for PowSnapshot
sourcefn chunk_all(
&mut self,
chain: &BlockChain,
block_at: H256,
chunk_sink: &mut ChunkSink<'_>,
progress: &Progress,
preferred_size: usize,
eip1559_transition: BlockNumber
) -> Result<(), Error>
fn chunk_all(
&mut self,
chain: &BlockChain,
block_at: H256,
chunk_sink: &mut ChunkSink<'_>,
progress: &Progress,
preferred_size: usize,
eip1559_transition: BlockNumber
) -> Result<(), Error>
Create secondary snapshot chunks; these corroborate the state data in the state chunks. Read more
sourcefn rebuilder(
&self,
chain: BlockChain,
db: Arc<dyn BlockChainDB>,
manifest: &ManifestData
) -> Result<Box<dyn Rebuilder>, Error>
fn rebuilder(
&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 aribtrary order and then be finalized. Read more
sourcefn min_supported_version(&self) -> u64
fn min_supported_version(&self) -> u64
Minimum supported snapshot version number.
sourcefn current_version(&self) -> u64
fn current_version(&self) -> u64
Current version number
impl Copy for PowSnapshot
impl StructuralPartialEq for PowSnapshot
Auto Trait Implementations
impl RefUnwindSafe for PowSnapshot
impl Send for PowSnapshot
impl Sync for PowSnapshot
impl Unpin for PowSnapshot
impl UnwindSafe for PowSnapshot
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more