mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
Extends ChildStateBackend and ChildStateAPI with ReadProofs (#8812)
* Extends ChildStateBackend and ChildStateAPI with ReadProofs The following changes integrate the existing `read_child_proof` from the `ProofProvider` into the ChildStateBackend, so that a read proof can be generated from a full client via an rpc call. * Cleanup formatting
This commit is contained in:
@@ -23,6 +23,7 @@ use sp_core::storage::{StorageKey, PrefixedStorageKey, StorageData};
|
||||
use crate::state::error::FutureResult;
|
||||
|
||||
pub use self::gen_client::Client as ChildStateClient;
|
||||
use crate::state::ReadProof;
|
||||
|
||||
/// Substrate child state API
|
||||
///
|
||||
@@ -68,4 +69,13 @@ pub trait ChildStateApi<Hash> {
|
||||
key: StorageKey,
|
||||
hash: Option<Hash>
|
||||
) -> FutureResult<Option<u64>>;
|
||||
|
||||
/// Returns proof of storage for child key entries at a specific block's state.
|
||||
#[rpc(name = "state_getChildReadProof")]
|
||||
fn read_child_proof(
|
||||
&self,
|
||||
child_storage_key: PrefixedStorageKey,
|
||||
keys: Vec<StorageKey>,
|
||||
hash: Option<Hash>,
|
||||
) -> FutureResult<ReadProof<Hash>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user