mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Additional RPC for dumping all main storage key pairs under a prefix (#4803)
* Merge branch 'gav-split-balanecs-vesting' into gav-upsub # Conflicts: # Cargo.lock # cli/Cargo.toml # collator/Cargo.toml # primitives/Cargo.toml # runtime/common/Cargo.toml # runtime/common/src/claims.rs # runtime/kusama/Cargo.toml # runtime/polkadot/Cargo.toml # service/Cargo.toml * Update client/src/client.rs * Update client/src/client.rs * Fix merge conflict Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -63,6 +63,13 @@ pub trait StateBackend<B, E, Block: BlockT, RA>: Send + Sync + 'static
|
||||
prefix: StorageKey,
|
||||
) -> FutureResult<Vec<StorageKey>>;
|
||||
|
||||
/// Returns the keys with prefix along with their values, leave empty to get all the pairs.
|
||||
fn storage_pairs(
|
||||
&self,
|
||||
block: Option<Block::Hash>,
|
||||
prefix: StorageKey,
|
||||
) -> FutureResult<Vec<(StorageKey, StorageData)>>;
|
||||
|
||||
/// Returns the keys with prefix with pagination support.
|
||||
fn storage_keys_paged(
|
||||
&self,
|
||||
@@ -255,6 +262,14 @@ impl<B, E, Block, RA> StateApi<Block::Hash> for State<B, E, Block, RA>
|
||||
self.backend.storage_keys(block, key_prefix)
|
||||
}
|
||||
|
||||
fn storage_pairs(
|
||||
&self,
|
||||
key_prefix: StorageKey,
|
||||
block: Option<Block::Hash>,
|
||||
) -> FutureResult<Vec<(StorageKey, StorageData)>> {
|
||||
self.backend.storage_pairs(block, key_prefix)
|
||||
}
|
||||
|
||||
fn storage_keys_paged(
|
||||
&self,
|
||||
prefix: Option<StorageKey>,
|
||||
|
||||
Reference in New Issue
Block a user