[−][src]Trait sc_client_api::light::Storage
Light client blockchain storage.
Required methods
pub fn import_header(
&self,
header: Block::Header,
cache: HashMap<Id, Vec<u8>>,
state: NewBlockState,
aux_ops: Vec<(Vec<u8>, Option<Vec<u8>>)>
) -> ClientResult<()>
[src]
&self,
header: Block::Header,
cache: HashMap<Id, Vec<u8>>,
state: NewBlockState,
aux_ops: Vec<(Vec<u8>, Option<Vec<u8>>)>
) -> ClientResult<()>
Store new header. Should refuse to revert any finalized blocks.
Takes new authorities, the leaf state of the new block, and any auxiliary storage updates to place in the same operation.
pub fn set_head(&self, block: BlockId<Block>) -> ClientResult<()>
[src]
Set an existing block as new best block.
pub fn finalize_header(&self, block: BlockId<Block>) -> ClientResult<()>
[src]
Mark historic header as finalized.
pub fn last_finalized(&self) -> ClientResult<Block::Hash>
[src]
Get last finalized header.
pub fn cache(&self) -> Option<Arc<dyn BlockchainCache<Block>>>
[src]
Get storage cache.
pub fn usage_info(&self) -> Option<UsageInfo>
[src]
Get storage usage statistics.
Implementors
impl<Block: BlockT> Storage<Block> for Blockchain<Block> where
Block::Hash: From<[u8; 32]>,
[src]
Block::Hash: From<[u8; 32]>,
pub fn import_header(
&self,
header: Block::Header,
_cache: HashMap<CacheKeyId, Vec<u8>>,
state: NewBlockState,
aux_ops: Vec<(Vec<u8>, Option<Vec<u8>>)>
) -> Result<()>
[src]
&self,
header: Block::Header,
_cache: HashMap<CacheKeyId, Vec<u8>>,
state: NewBlockState,
aux_ops: Vec<(Vec<u8>, Option<Vec<u8>>)>
) -> Result<()>