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

Commit

Permalink
WIP: work on 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 2426a3d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 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::Hash, NumberFor<Block>>,
{
/// The client instance to use.
pub client: Arc<C>,
/// Transaction pool instance.
Expand All @@ -80,15 +83,15 @@ pub struct FullDeps<C, P, SC, Env> {
pub babe: BabeDeps,
// WIP: sort out trait dependencies
pub shared_voter_state: SharedVoterState<
<Block as BlockT>::Hash,
Block::Hash,
NumberFor<Block>,
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 2426a3d

Please sign in to comment.