Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Make Client convenience trait public (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
adoerr authored Mar 25, 2021
1 parent c88af04 commit 9450b54
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client/beefy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/rust-lang/rust/issues/41517>.
pub(crate) trait Client<B, BE, P>:
pub trait Client<B, BE, P>:
BlockchainEvents<B> + HeaderBackend<B> + Finalizer<B, BE> + ProvideRuntimeApi<B> + Send + Sync
where
B: Block,
Expand Down Expand Up @@ -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<B, P, BE, C, N, SO>(
client: Arc<C>,
key_store: SyncCryptoStorePtr,
Expand All @@ -123,7 +121,7 @@ pub async fn start_beefy_gadget<B, P, BE, C, N, SO>(
P::Public: AppPublic + Codec,
P::Signature: Clone + Codec + Debug + PartialEq + TryFrom<Vec<u8>>,
BE: Backend<B>,
C: BlockchainEvents<B> + HeaderBackend<B> + Finalizer<B, BE> + ProvideRuntimeApi<B> + Send + Sync,
C: Client<B, BE, P>,
C::Api: BeefyApi<B, P::Public>,
N: GossipNetwork<B> + Clone + Send + 'static,
SO: SyncOracleT + Send + 'static,
Expand Down

0 comments on commit 9450b54

Please sign in to comment.