referrerpolicy=no-referrer-when-downgrade
cumulus_test_client

Type Alias Client

Source
pub type Client = Client<Backend, Executor, Block, RuntimeApi>;
Expand description

Test client type with LocalExecutor and generic Backend.

Aliased Type§

struct Client { /* private fields */ }

Implementations

Source§

impl<B, E, Block, RA> Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block, <Block as Block>::Header: Clone,

Source

pub fn new<G>( backend: Arc<B>, executor: E, spawn_handle: Box<dyn SpawnNamed>, genesis_block_builder: G, fork_blocks: Option<Vec<(<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash)>>, bad_blocks: Option<HashSet<<Block as Block>::Hash>>, prometheus_registry: Option<Registry>, telemetry: Option<TelemetryHandle>, config: ClientConfig<Block>, ) -> Result<Client<B, E, Block, RA>, Error>
where G: BuildGenesisBlock<Block, BlockImportOperation = <B as Backend<Block>>::BlockImportOperation>, E: Clone, B: 'static,

Creates new Substrate Client with given blockchain and code executor.

Source

pub fn import_notification_sinks( &self, ) -> &Mutex<RawMutex, Vec<TracingUnboundedSender<BlockImportNotification<Block>>>>

returns a reference to the block import notification sinks useful for test environments.

Source

pub fn finality_notification_sinks( &self, ) -> &Mutex<RawMutex, Vec<TracingUnboundedSender<FinalityNotification<Block>>>>

returns a reference to the finality notification sinks useful for test environments.

Source

pub fn state_at( &self, hash: <Block as Block>::Hash, ) -> Result<<B as Backend<Block>>::State, Error>

Get a reference to the state at a given block.

Source

pub fn code_at(&self, hash: <Block as Block>::Hash) -> Result<Vec<u8>, Error>

Get the code at a given block.

This takes any potential substitutes into account, but ignores overrides.

Source

pub fn runtime_version_at( &self, hash: <Block as Block>::Hash, ) -> Result<RuntimeVersion, Error>

Get the RuntimeVersion at a given block.

Source

pub fn revert( &self, n: <<Block as Block>::Header as Header>::Number, ) -> Result<<<Block as Block>::Header as Header>::Number, Error>

Attempts to revert the chain by n blocks guaranteeing that no block is reverted past the last finalized block. Returns the number of blocks that were successfully reverted.

Source

pub fn unsafe_revert( &mut self, n: <<Block as Block>::Header as Header>::Number, blacklist: bool, ) -> Result<<<Block as Block>::Header as Header>::Number, Error>

Attempts to revert the chain by n blocks disregarding finality. This method will revert any finalized blocks as requested and can potentially leave the node in an inconsistent state. Other modules in the system that persist data and that rely on finality (e.g. consensus parts) will be unaffected by the revert. Use this method with caution and making sure that no other data needs to be reverted for consistency aside from the block data. If blacklist is set to true, will also blacklist reverted blocks from finalizing again. The blacklist is reset upon client restart.

Returns the number of blocks that were successfully reverted.

Source

pub fn chain_info(&self) -> Info<Block>

Get blockchain info.

Source

pub fn block_status( &self, hash: <Block as Block>::Hash, ) -> Result<BlockStatus, Error>

Get block status.

Source

pub fn header( &self, hash: <Block as Block>::Hash, ) -> Result<Option<<Block as Block>::Header>, Error>

Get block header by id.

Source

pub fn body( &self, hash: <Block as Block>::Hash, ) -> Result<Option<Vec<<Block as Block>::Extrinsic>>, Error>

Get block body by id.

Source

pub fn uncles( &self, target_hash: <Block as Block>::Hash, max_generation: <<Block as Block>::Header as Header>::Number, ) -> Result<Vec<<Block as Block>::Hash>, Error>

Gets the uncles of the block with target_hash going back max_generation ancestors.

Trait Implementations§

Source§

impl InitBlockBuilder for Client

Source§

fn init_block_builder( &self, validation_data: Option<PersistedValidationData<PHash, PBlockNumber>>, relay_sproof_builder: RelayStateSproofBuilder, ) -> BlockBuilderAndSupportData<'_>

Init a specific block builder that works for the test runtime. Read more
Source§

fn init_block_builder_at( &self, at: Hash, validation_data: Option<PersistedValidationData<PHash, PBlockNumber>>, relay_sproof_builder: RelayStateSproofBuilder, ) -> BlockBuilderAndSupportData<'_>

Init a specific block builder at a specific block that works for the test runtime. Read more
Source§

fn init_block_builder_with_timestamp( &self, at: Hash, validation_data: Option<PersistedValidationData<PHash, PBlockNumber>>, relay_sproof_builder: RelayStateSproofBuilder, timestamp: u64, ) -> BlockBuilderAndSupportData<'_>

Init a specific block builder that works for the test runtime. Read more
Source§

impl<B, E, Block, RA> AuxStore for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block, Client<B, E, Block, RA>: ProvideRuntimeApi<Block>, <Client<B, E, Block, RA> as ProvideRuntimeApi<Block>>::Api: Core<Block>,

Source§

fn insert_aux<'a, 'b, 'c, I, D>( &self, insert: I, delete: D, ) -> Result<(), Error>
where 'b: 'a, 'c: 'a, I: IntoIterator<Item = &'a (&'c [u8], &'c [u8])>, D: IntoIterator<Item = &'a &'b [u8]>,

Insert auxiliary data into key-value store.

Source§

fn get_aux(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Error>

Query auxiliary data from key-value store.

Source§

impl<B, E, Block, RA> BlockBackend<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block,

Source§

fn block_body( &self, hash: <Block as Block>::Hash, ) -> Result<Option<Vec<<Block as Block>::Extrinsic>>, Error>

Get block body by ID. Returns None if the body is not stored.
Source§

fn block( &self, hash: <Block as Block>::Hash, ) -> Result<Option<SignedBlock<Block>>, Error>

Get full block by hash.
Source§

fn block_status( &self, hash: <Block as Block>::Hash, ) -> Result<BlockStatus, Error>

Get block status by block hash.
Source§

fn justifications( &self, hash: <Block as Block>::Hash, ) -> Result<Option<Justifications>, Error>

Get block justifications for the block with the given hash.
Source§

fn block_hash( &self, number: <<Block as Block>::Header as Header>::Number, ) -> Result<Option<<Block as Block>::Hash>, Error>

Get block hash by number.
Source§

fn indexed_transaction( &self, hash: <Block as Block>::Hash, ) -> Result<Option<Vec<u8>>, Error>

Get single indexed transaction by content hash. Read more
Source§

fn has_indexed_transaction( &self, hash: <Block as Block>::Hash, ) -> Result<bool, Error>

Check if transaction index exists.
Source§

fn block_indexed_body( &self, hash: <Block as Block>::Hash, ) -> Result<Option<Vec<Vec<u8>>>, Error>

Get all indexed transactions for a block, including renewed transactions. Read more
Source§

fn requires_full_sync(&self) -> bool

Tells whether the current client configuration requires full-sync mode.
Source§

impl<B, E, Block, RA> BlockIdTo<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block> + Send + Sync, Block: Block, RA: Send + Sync,

Source§

type Error = Error

The error type that will be returned by the functions.
Source§

fn to_hash( &self, block_id: &BlockId<Block>, ) -> Result<Option<<Block as Block>::Hash>, Error>

Convert the given block_id to the corresponding block hash.
Source§

fn to_number( &self, block_id: &BlockId<Block>, ) -> Result<Option<<<Block as Block>::Header as Header>::Number>, Error>

Convert the given block_id to the corresponding block number.
Source§

impl<B, E, Block, RA> BlockImport<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block> + Send + Sync, Block: Block, Client<B, E, Block, RA>: ProvideRuntimeApi<Block>, <Client<B, E, Block, RA> as ProvideRuntimeApi<Block>>::Api: Core<Block> + ApiExt<Block>, RA: Sync + Send,

Source§

type Error = Error

The error type.
Source§

fn check_block<'life0, 'async_trait>( &'life0 self, block: BlockCheckParams<Block>, ) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Client<B, E, Block, RA> as BlockImport<Block>>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Client<B, E, Block, RA>: 'async_trait,

Check block preconditions.
Source§

fn import_block<'life0, 'async_trait>( &'life0 self, import_block: BlockImportParams<Block>, ) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Client<B, E, Block, RA> as BlockImport<Block>>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Client<B, E, Block, RA>: 'async_trait,

Import a block.
Source§

impl<B, E, Block, RA> BlockOf for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block,

Source§

type Type = Block

The type of the block.
Source§

impl<B, E, Block, RA> BlockchainEvents<Block> for Client<B, E, Block, RA>
where E: CallExecutor<Block>, Block: Block,

Source§

fn import_notification_stream( &self, ) -> TracingUnboundedReceiver<BlockImportNotification<Block>>

Get block import event stream.

Source§

fn storage_changes_notification_stream( &self, filter_keys: Option<&[StorageKey]>, child_filter_keys: Option<&[(StorageKey, Option<Vec<StorageKey>>)]>, ) -> Result<StorageEventStream<<Block as Block>::Hash>, Error>

Get storage changes event stream.

Source§

fn every_import_notification_stream( &self, ) -> TracingUnboundedReceiver<BlockImportNotification<Block>>

Get a stream of every imported block.
Source§

fn finality_notification_stream( &self, ) -> TracingUnboundedReceiver<FinalityNotification<Block>>

Get a stream of finality notifications. Not guaranteed to be fired for every finalized block.
Source§

impl<B, E, Block, RA> CallApiAt<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block, Backend = B> + Send + Sync, Block: Block, RA: Send + Sync,

Source§

type StateBackend = <B as Backend<Block>>::State

The state backend that is used to store the block states.
Source§

fn call_api_at( &self, params: CallApiAtParams<'_, Block>, ) -> Result<Vec<u8>, ApiError>

Calls the given api function with the given encoded arguments at the given block and returns the encoded result.
Source§

fn runtime_version_at( &self, hash: <Block as Block>::Hash, ) -> Result<RuntimeVersion, ApiError>

Returns the runtime version at the given block.
Source§

fn state_at( &self, at: <Block as Block>::Hash, ) -> Result<<Client<B, E, Block, RA> as CallApiAt<Block>>::StateBackend, ApiError>

Get the state at the given block.
Source§

fn initialize_extensions( &self, at: <Block as Block>::Hash, extensions: &mut Extensions, ) -> Result<(), ApiError>

Initialize the extensions for the given block at by using the global extensions factory.
Source§

impl<BE, E, B, RA> Chain<B> for Client<BE, E, B, RA>
where BE: Backend<B>, E: CallExecutor<B>, B: Block,

Source§

fn block_status( &self, hash: <B as Block>::Hash, ) -> Result<BlockStatus, Box<dyn Error + Send>>

Retrieve the status of the block denoted by the given Block::Hash.
Source§

impl<B, E, RA, Block> ClientBlockImportExt<Block> for Client<B, E, Block, RA>
where Block: Block, Client<B, E, Block, RA>: BlockImport<Block, Error = Error>, RA: Send + Sync, B: Send + Sync, E: Send + Sync,

Source§

fn import<'life0, 'async_trait>( &'life0 self, origin: BlockOrigin, block: Block, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Client<B, E, Block, RA>: 'async_trait,

Import block to the chain. No finality.
Source§

fn import_as_best<'life0, 'async_trait>( &'life0 self, origin: BlockOrigin, block: Block, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Client<B, E, Block, RA>: 'async_trait,

Import a block and make it our best block if possible.
Source§

fn import_as_final<'life0, 'async_trait>( &'life0 self, origin: BlockOrigin, block: Block, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Client<B, E, Block, RA>: 'async_trait,

Import a block and finalize it.
Source§

fn import_justified<'life0, 'async_trait>( &'life0 self, origin: BlockOrigin, block: Block, justifications: Justifications, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Client<B, E, Block, RA>: 'async_trait,

Import block with justification(s), finalizes block.
Source§

impl<B, E, RA, Block> ClientExt<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block> + RuntimeVersionOf + 'static, Client<B, E, Block, RA>: BlockImport<Block, Error = Error>, Block: Block,

Source§

fn finalize_block( &self, hash: <Block as Block>::Hash, justification: Option<([u8; 4], Vec<u8>)>, ) -> Result<(), Error>

Finalize a block.
Source§

fn genesis_hash(&self) -> <Block as Block>::Hash

Returns hash of the genesis block.
Source§

impl<B, E, Block, RA> ExecutorProvider<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block,

Source§

type Executor = E

executor instance
Source§

fn executor( &self, ) -> &<Client<B, E, Block, RA> as ExecutorProvider<Block>>::Executor

Get call executor reference.
Source§

fn execution_extensions(&self) -> &ExecutionExtensions<Block>

Get a reference to the execution extensions.
Source§

impl<B, E, Block, RA> Finalizer<Block, B> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block,

Source§

fn apply_finality( &self, operation: &mut ClientImportOperation<Block, B>, hash: <Block as Block>::Hash, justification: Option<([u8; 4], Vec<u8>)>, notify: bool, ) -> Result<(), Error>

Mark all blocks up to given as finalized in operation. Read more
Source§

fn finalize_block( &self, hash: <Block as Block>::Hash, justification: Option<([u8; 4], Vec<u8>)>, notify: bool, ) -> Result<(), Error>

Finalize a block. Read more
Source§

impl<B, E, Block, RA> HeaderBackend<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block> + Send + Sync, Block: Block, RA: Send + Sync,

Source§

fn header( &self, hash: <Block as Block>::Hash, ) -> Result<Option<<Block as Block>::Header>, Error>

Get block header. Returns None if block is not found.
Source§

fn info(&self) -> Info<Block>

Get blockchain info.
Source§

fn status(&self, hash: <Block as Block>::Hash) -> Result<BlockStatus, Error>

Get block status.
Source§

fn number( &self, hash: <Block as Block>::Hash, ) -> Result<Option<<<Block as Block>::Header as Header>::Number>, Error>

Get block number by hash. Returns None if the header is not in the chain.
Source§

fn hash( &self, number: <<Block as Block>::Header as Header>::Number, ) -> Result<Option<<Block as Block>::Hash>, Error>

Get block hash by number. Returns None if the header is not in the chain.
Source§

fn block_hash_from_id( &self, id: &BlockId<Block>, ) -> Result<Option<<Block as Block>::Hash>, Error>

Convert an arbitrary block ID into a block hash.
Source§

fn block_number_from_id( &self, id: &BlockId<Block>, ) -> Result<Option<<<Block as Block>::Header as Header>::Number>, Error>

Convert an arbitrary block ID into a block hash.
Source§

fn expect_header( &self, hash: <Block as Block>::Hash, ) -> Result<<Block as Block>::Header, Error>

Get block header. Returns UnknownBlock error if block is not found.
Source§

fn expect_block_number_from_id( &self, id: &BlockId<Block>, ) -> Result<<<Block as Block>::Header as Header>::Number, Error>

Convert an arbitrary block ID into a block number. Returns UnknownBlock error if block is not found.
Source§

fn expect_block_hash_from_id( &self, id: &BlockId<Block>, ) -> Result<<Block as Block>::Hash, Error>

Convert an arbitrary block ID into a block hash. Returns UnknownBlock error if block is not found.
Source§

impl<B, E, Block, RA> HeaderMetadata<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block,

Source§

type Error = Error

Error used in case the header metadata is not found.
Source§

fn header_metadata( &self, hash: <Block as Block>::Hash, ) -> Result<CachedHeaderMetadata<Block>, <Client<B, E, Block, RA> as HeaderMetadata<Block>>::Error>

Source§

fn insert_header_metadata( &self, hash: <Block as Block>::Hash, metadata: CachedHeaderMetadata<Block>, )

Source§

fn remove_header_metadata(&self, hash: <Block as Block>::Hash)

Source§

impl<BE, E, B, RA> IndexedBody<B> for Client<BE, E, B, RA>
where BE: Backend<B>, E: CallExecutor<B>, B: Block,

Source§

fn block_indexed_body( &self, number: <<B as Block>::Header as Header>::Number, ) -> Result<Option<Vec<Vec<u8>>>, Error>

Get all indexed transactions for a block, including renewed transactions. Read more
Source§

fn number( &self, hash: <B as Block>::Hash, ) -> Result<Option<<<B as Block>::Header as Header>::Number>, Error>

Get block number for a block hash.
Source§

impl<B, E, Block, RA> LockImportRun<Block, B> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block,

Source§

fn lock_import_and_run<R, Err, F>(&self, f: F) -> Result<R, Err>
where F: FnOnce(&mut ClientImportOperation<Block, B>) -> Result<R, Err>, Err: From<Error>,

Lock the import lock, and run operations inside.
Source§

impl<B, E, Block, RA> PreCommitActions<Block> for Client<B, E, Block, RA>
where Block: Block,

Source§

fn register_import_action( &self, action: Box<dyn Fn(&BlockImportNotification<Block>) -> Vec<(Vec<u8>, Option<Vec<u8>>)> + Send>, )

Actions to be performed on block import.
Source§

fn register_finality_action( &self, action: Box<dyn Fn(&FinalityNotification<Block>) -> Vec<(Vec<u8>, Option<Vec<u8>>)> + Send>, )

Actions to be performed on block finalization.
Source§

impl<B, E, Block, RA> ProofProvider<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block,

Source§

fn read_proof( &self, hash: <Block as Block>::Hash, keys: &mut dyn Iterator<Item = &[u8]>, ) -> Result<StorageProof, Error>

Reads storage value at a given block + key, returning read proof.
Source§

fn read_child_proof( &self, hash: <Block as Block>::Hash, child_info: &ChildInfo, keys: &mut dyn Iterator<Item = &[u8]>, ) -> Result<StorageProof, Error>

Reads child storage value at a given block + storage_key + key, returning read proof.
Source§

fn execution_proof( &self, hash: <Block as Block>::Hash, method: &str, call_data: &[u8], ) -> Result<(Vec<u8>, StorageProof), Error>

Execute a call to a contract on top of state in a block of given hash AND returning execution proof. Read more
Source§

fn read_proof_collection( &self, hash: <Block as Block>::Hash, start_key: &[Vec<u8>], size_limit: usize, ) -> Result<(CompactProof, u32), Error>

Given a Hash iterate over all storage values starting at start_keys. Last start_keys element contains last accessed key value. With multiple start_keys, first start_keys element is the current storage key of of the last accessed child trie. at last level the value to start at exclusively. Proofs is build until size limit is reached and always include at least one key following start_keys. Returns combined proof and the numbers of collected keys.
Source§

fn storage_collection( &self, hash: <Block as Block>::Hash, start_key: &[Vec<u8>], size_limit: usize, ) -> Result<Vec<(KeyValueStorageLevel, bool)>, Error>

Given a Hash iterate over all storage values starting at start_key. Returns collected keys and values. Returns the collected keys values content of the top trie followed by the collected keys values of child tries. Only child tries with their root part of the collected content or related to start_key are attached. For each collected state a boolean indicates if state reach end.
Source§

fn verify_range_proof( &self, root: <Block as Block>::Hash, proof: CompactProof, start_key: &[Vec<u8>], ) -> Result<(KeyValueStates, usize), Error>

Verify read storage proof for a set of keys. Returns collected key-value pairs and the nested state depth of current iteration or 0 if completed.
Source§

impl<B, E, Block, RA> ProvideRuntimeApi<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block, Backend = B> + Send + Sync, Block: Block, RA: ConstructRuntimeApi<Block, Client<B, E, Block, RA>> + Send + Sync,

Source§

type Api = <RA as ConstructRuntimeApi<Block, Client<B, E, Block, RA>>>::RuntimeApi

The concrete type that provides the api.
Source§

fn runtime_api( &self, ) -> ApiRef<'_, <Client<B, E, Block, RA> as ProvideRuntimeApi<Block>>::Api>

Returns the runtime api. The returned instance will keep track of modifications to the storage. Any successful call to an api function, will commit its changes to an internal buffer. Otherwise, the modifications will be discarded. The modifications will not be applied to the storage, even on a commit.
Source§

impl<B, E, Block, RA> ProvideUncles<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block,

Source§

fn uncles( &self, target_hash: <Block as Block>::Hash, max_generation: <<Block as Block>::Header as Header>::Number, ) -> Result<Vec<<Block as Block>::Header>, Error>

Gets the uncles of the block with target_hash going back max_generation ancestors.
Source§

impl<B, E, Block, RA> StorageProvider<Block, B> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block,

Source§

fn storage_keys( &self, hash: <Block as Block>::Hash, prefix: Option<&StorageKey>, start_key: Option<&StorageKey>, ) -> Result<KeysIter<<B as Backend<Block>>::State, Block>, Error>

Given a block’s Hash and a key prefix, returns a KeysIter iterates matching storage keys in that block.
Source§

fn child_storage_keys( &self, hash: <Block as Block>::Hash, child_info: ChildInfo, prefix: Option<&StorageKey>, start_key: Option<&StorageKey>, ) -> Result<KeysIter<<B as Backend<Block>>::State, Block>, Error>

Given a block’s Hash and a key prefix and a child storage key, returns a KeysIter that iterates matching storage keys in that block.
Source§

fn storage_pairs( &self, hash: <Block as Block>::Hash, prefix: Option<&StorageKey>, start_key: Option<&StorageKey>, ) -> Result<PairsIter<<B as Backend<Block>>::State, Block>, Error>

Given a block’s Hash and a key prefix, returns an iterator over the storage keys and values in that block.
Source§

fn storage( &self, hash: <Block as Block>::Hash, key: &StorageKey, ) -> Result<Option<StorageData>, Error>

Given a block’s Hash and a key, return the value under the key in that block.
Source§

fn storage_hash( &self, hash: <Block as Block>::Hash, key: &StorageKey, ) -> Result<Option<<Block as Block>::Hash>, Error>

Given a block’s Hash and a key, return the value under the hash in that block.
Source§

fn child_storage( &self, hash: <Block as Block>::Hash, child_info: &ChildInfo, key: &StorageKey, ) -> Result<Option<StorageData>, Error>

Given a block’s Hash, a key and a child storage key, return the value under the key in that block.
Source§

fn child_storage_hash( &self, hash: <Block as Block>::Hash, child_info: &ChildInfo, key: &StorageKey, ) -> Result<Option<<Block as Block>::Hash>, Error>

Given a block’s Hash, a key and a child storage key, return the hash under the key in that block.
Source§

fn closest_merkle_value( &self, hash: <Block as Block>::Hash, key: &StorageKey, ) -> Result<Option<MerkleValue<<Block as Block>::Hash>>, Error>

Given a block’s Hash and a key, return the closest merkle value.
Source§

fn child_closest_merkle_value( &self, hash: <Block as Block>::Hash, child_info: &ChildInfo, key: &StorageKey, ) -> Result<Option<MerkleValue<<Block as Block>::Hash>>, Error>

Given a block’s Hash, a key and a child storage key, return the closest merkle value.
Source§

impl<B, E, Block, RA> UsageProvider<Block> for Client<B, E, Block, RA>
where B: Backend<Block>, E: CallExecutor<Block>, Block: Block,

Source§

fn usage_info(&self) -> ClientInfo<Block>

Get usage info about current client.