Struct ethcore::snapshot::StateRebuilder [−][src]
pub struct StateRebuilder { /* fields omitted */ }Used to rebuild the state trie piece by piece.
Methods
impl StateRebuilder[src]
impl StateRebuilderpub fn new(db: Arc<KeyValueDB>, pruning: Algorithm) -> Self[src]
pub fn new(db: Arc<KeyValueDB>, pruning: Algorithm) -> SelfCreate a new state rebuilder to write into the given backing DB.
pub fn feed(&mut self, chunk: &[u8], flag: &AtomicBool) -> Result<(), Error>[src]
pub fn feed(&mut self, chunk: &[u8], flag: &AtomicBool) -> Result<(), Error>Feed an uncompressed state chunk into the rebuilder.
pub fn finalize(self, era: u64, id: H256) -> Result<Box<JournalDB>, Error>[src]
pub fn finalize(self, era: u64, id: H256) -> Result<Box<JournalDB>, Error>Finalize the restoration. Check for accounts missing code and make a dummy journal entry. Once all chunks have been fed, there should be nothing missing.
pub fn state_root(&self) -> H256[src]
pub fn state_root(&self) -> H256Get the state root of the rebuilder.
Auto Trait Implementations
impl Send for StateRebuilder
impl Send for StateRebuilderimpl Sync for StateRebuilder
impl Sync for StateRebuilder