mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Adds state_queryStorageAt (#5362)
* adds state_queryStorageAt * make at param for query_storage_at optional * Update client/rpc/src/state/state_full.rs Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * adds query_storage_at to StateBackend Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
This commit is contained in:
@@ -163,6 +163,13 @@ pub trait StateBackend<Block: BlockT, Client>: Send + Sync + 'static
|
||||
keys: Vec<StorageKey>,
|
||||
) -> FutureResult<Vec<StorageChangeSet<Block::Hash>>>;
|
||||
|
||||
/// Query storage entries (by key) starting at block hash given as the second parameter.
|
||||
fn query_storage_at(
|
||||
&self,
|
||||
keys: Vec<StorageKey>,
|
||||
at: Option<Block::Hash>
|
||||
) -> FutureResult<Vec<StorageChangeSet<Block::Hash>>>;
|
||||
|
||||
/// New runtime version subscription
|
||||
fn subscribe_runtime_version(
|
||||
&self,
|
||||
@@ -357,6 +364,14 @@ impl<Block, Client> StateApi<Block::Hash> for State<Block, Client>
|
||||
self.backend.query_storage(from, to, keys)
|
||||
}
|
||||
|
||||
fn query_storage_at(
|
||||
&self,
|
||||
keys: Vec<StorageKey>,
|
||||
at: Option<Block::Hash>
|
||||
) -> FutureResult<Vec<StorageChangeSet<Block::Hash>>> {
|
||||
self.backend.query_storage_at(keys, at)
|
||||
}
|
||||
|
||||
fn subscribe_storage(
|
||||
&self,
|
||||
meta: Self::Metadata,
|
||||
|
||||
Reference in New Issue
Block a user