mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
Storage chains: indexing, renewals and reference counting (#8265)
* Transaction indexing * Tests and fixes * Fixed a comment * Style * Build * Style * Apply suggestions from code review Co-authored-by: cheme <emericchevalier.pro@gmail.com> * Code review suggestions * Add missing impl * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * impl JoinInput * Don't store empty slices * JoinInput operates on slices Co-authored-by: cheme <emericchevalier.pro@gmail.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -767,6 +767,7 @@ impl<B, E, Block, RA> Client<B, E, Block, RA> where
|
||||
offchain_sc,
|
||||
tx, _,
|
||||
changes_trie_tx,
|
||||
tx_index,
|
||||
) = storage_changes.into_inner();
|
||||
|
||||
if self.config.offchain_indexing_api {
|
||||
@@ -775,6 +776,7 @@ impl<B, E, Block, RA> Client<B, E, Block, RA> where
|
||||
|
||||
operation.op.update_db_storage(tx)?;
|
||||
operation.op.update_storage(main_sc.clone(), child_sc.clone())?;
|
||||
operation.op.update_transaction_index(tx_index)?;
|
||||
|
||||
if let Some(changes_trie_transaction) = changes_trie_tx {
|
||||
operation.op.update_changes_trie(changes_trie_transaction)?;
|
||||
@@ -1945,12 +1947,12 @@ impl<B, E, Block, RA> BlockBackend<Block> for Client<B, E, Block, RA>
|
||||
self.backend.blockchain().hash(number)
|
||||
}
|
||||
|
||||
fn extrinsic(&self, hash: &Block::Hash) -> sp_blockchain::Result<Option<Block::Extrinsic>> {
|
||||
self.backend.blockchain().extrinsic(hash)
|
||||
fn indexed_transaction(&self, hash: &Block::Hash) -> sp_blockchain::Result<Option<Vec<u8>>> {
|
||||
self.backend.blockchain().indexed_transaction(hash)
|
||||
}
|
||||
|
||||
fn have_extrinsic(&self, hash: &Block::Hash) -> sp_blockchain::Result<bool> {
|
||||
self.backend.blockchain().have_extrinsic(hash)
|
||||
fn has_indexed_transaction(&self, hash: &Block::Hash) -> sp_blockchain::Result<bool> {
|
||||
self.backend.blockchain().has_indexed_transaction(hash)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user