From 9450b5409eac48c77d765bf92bc34c4d90958748 Mon Sep 17 00:00:00 2001 From: Andreas Doerr Date: Thu, 25 Mar 2021 10:38:41 +0100 Subject: [PATCH] Make Client convenience trait public (#126) --- client/beefy/src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/client/beefy/src/lib.rs b/client/beefy/src/lib.rs index 467f9edc22d1f..9b2917082ae11 100644 --- a/client/beefy/src/lib.rs +++ b/client/beefy/src/lib.rs @@ -62,7 +62,7 @@ pub fn beefy_peers_set_config() -> sc_network::config::NonDefaultSetConfig { /// has to satisfy. Ideally that should actually be a trait alias. Unfortunately as /// of today, Rust does not allow a type alias to be used as a trait bound. Tracking /// issue is . -pub(crate) trait Client: +pub trait Client: BlockchainEvents + HeaderBackend + Finalizer + ProvideRuntimeApi + Send + Sync where B: Block, @@ -107,9 +107,7 @@ where /// Start the BEEFY gadget. /// -/// This is a thin shim around running and awaiting a BEEFY worker. The [`Client`] -/// convenience trait is not used here on purpose. We don't want to leak it into the -/// public interface of the BEEFY gadget. +/// This is a thin shim around running and awaiting a BEEFY worker. pub async fn start_beefy_gadget( client: Arc, key_store: SyncCryptoStorePtr, @@ -123,7 +121,7 @@ pub async fn start_beefy_gadget( P::Public: AppPublic + Codec, P::Signature: Clone + Codec + Debug + PartialEq + TryFrom>, BE: Backend, - C: BlockchainEvents + HeaderBackend + Finalizer + ProvideRuntimeApi + Send + Sync, + C: Client, C::Api: BeefyApi, N: GossipNetwork + Clone + Send + 'static, SO: SyncOracleT + Send + 'static,