Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Remove non-RPC storage_entries functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
hirschenberger committed Sep 9, 2021
1 parent d618704 commit d840015
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 37 deletions.
7 changes: 0 additions & 7 deletions client/rpc/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ where
key: StorageKey,
) -> FutureResult<Option<StorageData>>;

/// Returns storage entries for multiple keys at a specific block's state.
fn storage_entries(
&self,
block: Option<Block::Hash>,
keys: Vec<StorageKey>,
) -> FutureResult<Vec<Option<StorageData>>>;

/// Returns the hash of a storage entry at a block's state.
fn storage_hash(
&self,
Expand Down
20 changes: 1 addition & 19 deletions client/rpc/src/state/state_full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,24 +360,6 @@ where
async move { r }.boxed()
}

fn storage_entries(
&self,
block: Option<Block::Hash>,
keys: Vec<StorageKey>,
) -> FutureResult<Vec<Option<StorageData>>> {
let block = match self.block_or_best(block) {
Ok(b) => b,
Err(e) => return err(client_err(e)).boxed(),
};
let client = self.client.clone();
try_join_all(keys.into_iter().map(move |key| {
let res = client.storage(&BlockId::Hash(block), &key).map_err(client_err);

async move { res }
}))
.boxed()
}

fn storage_size(
&self,
block: Option<Block::Hash>,
Expand Down Expand Up @@ -758,7 +740,7 @@ where
.clone()
.child_storage(&BlockId::Hash(block), &child_info, &key)
.map_err(client_err);

async move {
res
}
Expand Down
11 changes: 0 additions & 11 deletions client/rpc/src/state/state_light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,6 @@ where
.boxed()
}

fn storage_entries(
&self,
block: Option<Block::Hash>,
keys: Vec<StorageKey>,
) -> FutureResult<Vec<Option<StorageData>>> {
let keys = keys.iter().map(|k| k.0.clone()).collect::<Vec<_>>();
storage(&*self.remote_blockchain, self.fetcher.clone(), self.block_or_best(block), keys)
.map_ok(|v| v.into_iter().map(|x| x.1).collect::<Vec<_>>())
.boxed()
}

fn storage_hash(
&self,
block: Option<Block::Hash>,
Expand Down

0 comments on commit d840015

Please sign in to comment.