Unverified Commit ca22bdca authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

Add `UsageProvider` trait to `AbstractClient` (#3106)

* Add `UsageProvider` trait to `AbstractClient`

* Fix
parent 45176894
Pipeline #139401 passed with stages
in 29 minutes and 48 seconds
......@@ -23,7 +23,7 @@ use sp_blockchain::HeaderBackend;
use sp_runtime::{
Justifications, generic::{BlockId, SignedBlock}, traits::{Block as BlockT, BlakeTwo256},
};
use sc_client_api::{Backend as BackendT, BlockchainEvents, KeyIterator, AuxStore};
use sc_client_api::{Backend as BackendT, BlockchainEvents, KeyIterator, AuxStore, UsageProvider};
use sp_storage::{StorageData, StorageKey, ChildInfo, PrefixedStorageKey};
use polkadot_primitives::v1::{Block, ParachainHost, AccountId, Nonce, Balance, Header, BlockNumber, Hash};
use consensus_common::BlockStatus;
......@@ -79,6 +79,7 @@ pub trait AbstractClient<Block, Backend>:
StateBackend = Backend::State
>
+ AuxStore
+ UsageProvider<Block>
where
Block: BlockT,
Backend: BackendT<Block>,
......@@ -95,6 +96,7 @@ impl<Block, Backend, Client> AbstractClient<Block, Backend> for Client
+ ProvideRuntimeApi<Block>
+ HeaderBackend<Block>
+ AuxStore
+ UsageProvider<Block>
+ Sized
+ Send
+ Sync
......@@ -173,7 +175,7 @@ impl ClientHandle for Client {
}
}
impl sc_client_api::UsageProvider<Block> for Client {
impl UsageProvider<Block> for Client {
fn usage_info(&self) -> sc_client_api::ClientInfo<Block> {
match self {
Self::Polkadot(client) => client.usage_info(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment