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

Commit

Permalink
WIP: trait bounds for FullDeps
Browse files Browse the repository at this point in the history
  • Loading branch information
octol committed Mar 25, 2020
1 parent 9937353 commit 58f52da
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/node/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ pub struct BabeDeps {
}

/// Full client dependencies.
pub struct FullDeps<C, P, SC, Env> {
pub struct FullDeps<C, P, SC, Env>
where
Env: voter::Environment<<Block as BlockT>::Hash, NumberFor<Block>>,
{
/// The client instance to use.
pub client: Arc<C>,
/// Transaction pool instance.
Expand All @@ -87,8 +90,8 @@ pub struct FullDeps<C, P, SC, Env> {
}

/// Instantiate all Full RPC extensions.
pub fn create_full<C, P, M, SC>(
deps: FullDeps<C, P, SC>,
pub fn create_full<C, P, M, SC, Env>(
deps: FullDeps<C, P, SC, Env>,
) -> jsonrpc_core::IoHandler<M> where
C: ProvideRuntimeApi<Block>,
C: HeaderBackend<Block> + HeaderMetadata<Block, Error=BlockChainError> + 'static,
Expand All @@ -101,6 +104,7 @@ pub fn create_full<C, P, M, SC>(
P: TransactionPool + 'static,
M: jsonrpc_core::Metadata + Default,
SC: SelectChain<Block> +'static,
Env: voter::Environment<<Block as BlockT>::Hash, NumberFor<Block>> + Send + Sync,
{
use substrate_frame_rpc_system::{FullSystem, SystemApi};
use pallet_contracts_rpc::{Contracts, ContractsApi};
Expand Down

0 comments on commit 58f52da

Please sign in to comment.