Trait sc_client_api::backend::BlockImportOperation [−][src]
Block insertion operation.
Keeps hold if the inserted block state and data.
Associated Types
type State: StateBackend<HashFor<Block>>
[src]
Associated state backend type.
Required methods
fn state(&self) -> Result<Option<&Self::State>>
[src]
Returns pending state.
Returns None for backends with locally-unavailable state data.
fn set_block_data(
&mut self,
header: Block::Header,
body: Option<Vec<Block::Extrinsic>>,
justification: Option<Justification>,
state: NewBlockState
) -> Result<()>
[src]
&mut self,
header: Block::Header,
body: Option<Vec<Block::Extrinsic>>,
justification: Option<Justification>,
state: NewBlockState
) -> Result<()>
Append block data to the transaction.
fn update_cache(&mut self, cache: HashMap<Id, Vec<u8>>)
[src]
Update cached data.
fn update_db_storage(
&mut self,
update: TransactionForSB<Self::State, Block>
) -> Result<()>
[src]
&mut self,
update: TransactionForSB<Self::State, Block>
) -> Result<()>
Inject storage data into the database.
fn reset_storage(&mut self, storage: Storage) -> Result<Block::Hash>
[src]
Inject storage data into the database replacing any existing data.
fn update_storage(
&mut self,
update: StorageCollection,
child_update: ChildStorageCollection
) -> Result<()>
[src]
&mut self,
update: StorageCollection,
child_update: ChildStorageCollection
) -> Result<()>
Set storage changes.
fn update_changes_trie(
&mut self,
update: ChangesTrieTransaction<HashFor<Block>, NumberFor<Block>>
) -> Result<()>
[src]
&mut self,
update: ChangesTrieTransaction<HashFor<Block>, NumberFor<Block>>
) -> Result<()>
Inject changes trie data into the database.
fn insert_aux<I>(&mut self, ops: I) -> Result<()> where
I: IntoIterator<Item = (Vec<u8>, Option<Vec<u8>>)>,
[src]
I: IntoIterator<Item = (Vec<u8>, Option<Vec<u8>>)>,
Insert auxiliary keys.
Values are None
if should be deleted.
fn mark_finalized(
&mut self,
id: BlockId<Block>,
justification: Option<Justification>
) -> Result<()>
[src]
&mut self,
id: BlockId<Block>,
justification: Option<Justification>
) -> Result<()>
Mark a block as finalized.
fn mark_head(&mut self, id: BlockId<Block>) -> Result<()>
[src]
Mark a block as new head. If both block import and set head are specified, set head overrides block import’s best block rule.
Provided methods
fn update_offchain_storage(
&mut self,
_offchain_update: OffchainOverlayedChanges
) -> Result<()>
[src]
&mut self,
_offchain_update: OffchainOverlayedChanges
) -> Result<()>
Write offchain storage changes to the database.
Implementors
impl<Block: BlockT> BlockImportOperation<Block> for BlockImportOperation<Block> where
Block::Hash: Ord,
[src]
Block::Hash: Ord,
type State = InMemoryBackend<HashFor<Block>>
fn state(&self) -> Result<Option<&Self::State>>
[src]
fn set_block_data(
&mut self,
header: <Block as BlockT>::Header,
body: Option<Vec<<Block as BlockT>::Extrinsic>>,
justification: Option<Justification>,
state: NewBlockState
) -> Result<()>
[src]
&mut self,
header: <Block as BlockT>::Header,
body: Option<Vec<<Block as BlockT>::Extrinsic>>,
justification: Option<Justification>,
state: NewBlockState
) -> Result<()>
fn update_cache(&mut self, cache: HashMap<CacheKeyId, Vec<u8>>)
[src]
fn update_db_storage(
&mut self,
update: <InMemoryBackend<HashFor<Block>> as StateBackend<HashFor<Block>>>::Transaction
) -> Result<()>
[src]
&mut self,
update: <InMemoryBackend<HashFor<Block>> as StateBackend<HashFor<Block>>>::Transaction
) -> Result<()>
fn update_changes_trie(
&mut self,
_update: ChangesTrieTransaction<HashFor<Block>, NumberFor<Block>>
) -> Result<()>
[src]
&mut self,
_update: ChangesTrieTransaction<HashFor<Block>, NumberFor<Block>>
) -> Result<()>
fn reset_storage(&mut self, storage: Storage) -> Result<Block::Hash>
[src]
fn insert_aux<I>(&mut self, ops: I) -> Result<()> where
I: IntoIterator<Item = (Vec<u8>, Option<Vec<u8>>)>,
[src]
I: IntoIterator<Item = (Vec<u8>, Option<Vec<u8>>)>,
fn update_storage(
&mut self,
_update: StorageCollection,
_child_update: ChildStorageCollection
) -> Result<()>
[src]
&mut self,
_update: StorageCollection,
_child_update: ChildStorageCollection
) -> Result<()>
fn mark_finalized(
&mut self,
block: BlockId<Block>,
justification: Option<Justification>
) -> Result<()>
[src]
&mut self,
block: BlockId<Block>,
justification: Option<Justification>
) -> Result<()>