mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 22:37:57 +00:00
Don't sync on top of pruned blocks (#2079)
* Don't sync to pruned blocks * Typo Co-Authored-By: arkpar <arkady.paronyan@gmail.com>
This commit is contained in:
@@ -142,6 +142,10 @@ pub trait Backend<Block, H>: AuxStore + Send + Sync where
|
||||
fn blockchain(&self) -> &Self::Blockchain;
|
||||
/// Returns reference to changes trie storage.
|
||||
fn changes_trie_storage(&self) -> Option<&Self::ChangesTrieStorage>;
|
||||
/// Returns true if state for given block is available.
|
||||
fn have_state_at(&self, hash: &Block::Hash, _number: NumberFor<Block>) -> bool {
|
||||
self.state_at(BlockId::Hash(hash.clone())).is_ok()
|
||||
}
|
||||
/// Returns state backend with post-state of given block.
|
||||
fn state_at(&self, block: BlockId<Block>) -> error::Result<Self::State>;
|
||||
/// Destroy state and save any useful data, such as cache.
|
||||
|
||||
Reference in New Issue
Block a user