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:
Seun Lanlege
2020-03-26 16:03:34 +01:00
committed by GitHub
parent 970c5f94f2
commit ab0f7d213a
5 changed files with 88 additions and 10 deletions
@@ -136,6 +136,14 @@ pub trait StateApi<Hash> {
hash: Option<Hash>
) -> FutureResult<Vec<StorageChangeSet<Hash>>>;
/// Query storage entries (by key) starting at block hash given as the second parameter.
#[rpc(name = "state_queryStorageAt")]
fn query_storage_at(
&self,
keys: Vec<StorageKey>,
at: Option<Hash>,
) -> FutureResult<Vec<StorageChangeSet<Hash>>>;
/// New runtime version subscription
#[pubsub(
subscription = "state_runtimeVersion",