mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 02:57:57 +00:00
Fix the storage_size/state_getStorageSize RPC call (#13154)
* Have `KeyIterator` clone the `prefix` it receives * Stream keys in `storage_size` RPC and add a runtime limit * Update client/rpc/Cargo.toml Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/rpc/src/state/utils.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Rename the types to signify that the cancellation is due to a timeout * Move the test into a `mod tests` * Add a comment regarding `biased` in `tokio::select` * Make the `clone` explicit when calling `KeyIterator::{new, new_child}` Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -71,8 +71,8 @@ pub trait StateApi<Hash> {
|
||||
fn storage_hash(&self, key: StorageKey, hash: Option<Hash>) -> RpcResult<Option<Hash>>;
|
||||
|
||||
/// Returns the size of a storage entry at a block's state.
|
||||
#[method(name = "state_getStorageSize", aliases = ["state_getStorageSizeAt"], blocking)]
|
||||
fn storage_size(&self, key: StorageKey, hash: Option<Hash>) -> RpcResult<Option<u64>>;
|
||||
#[method(name = "state_getStorageSize", aliases = ["state_getStorageSizeAt"])]
|
||||
async fn storage_size(&self, key: StorageKey, hash: Option<Hash>) -> RpcResult<Option<u64>>;
|
||||
|
||||
/// Returns the runtime metadata as an opaque blob.
|
||||
#[method(name = "state_getMetadata", blocking)]
|
||||
|
||||
Reference in New Issue
Block a user