From 7f34d76fd4e457a35dc644903a768cdd7fa7cf7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 26 May 2021 13:15:45 +0200 Subject: [PATCH] Add `UsageProvider` trait to `AbstractClient` (#3106) * Add `UsageProvider` trait to `AbstractClient` * Fix --- polkadot/node/service/src/client.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/polkadot/node/service/src/client.rs b/polkadot/node/service/src/client.rs index cd11d6a52c..97cd112c3f 100644 --- a/polkadot/node/service/src/client.rs +++ b/polkadot/node/service/src/client.rs @@ -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: StateBackend = Backend::State > + AuxStore + + UsageProvider where Block: BlockT, Backend: BackendT, @@ -95,6 +96,7 @@ impl AbstractClient for Client + ProvideRuntimeApi + HeaderBackend + AuxStore + + UsageProvider + Sized + Send + Sync @@ -173,7 +175,7 @@ impl ClientHandle for Client { } } -impl sc_client_api::UsageProvider for Client { +impl UsageProvider for Client { fn usage_info(&self) -> sc_client_api::ClientInfo { match self { Self::Polkadot(client) => client.usage_info(),