Companion PR for #7039: grandpa-rpc dont share subscription manager, only executor (#1687)

* grandpa-rpc: dont share subscription manager, only executor

* node/rpc: merge imports

* node: apply style fixes from code review

* "Update Substrate"

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: parity-processbot <>
Co-authored-by: André Silva <andrerfosilva@gmail.com>
This commit is contained in:
Jon Häggblad
2020-09-14 13:30:52 +02:00
committed by GitHub
parent a95fd98c7d
commit 1cabde4932
5 changed files with 213 additions and 177 deletions
+6 -3
View File
@@ -121,7 +121,10 @@ pub fn new_partial<RuntimeApi, Executor>(config: &mut Configuration, test: bool)
consensus_common::DefaultImportQueue<Block, FullClient<RuntimeApi, Executor>>,
sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, Executor>>,
(
impl Fn(polkadot_rpc::DenyUnsafe, polkadot_rpc::SubscriptionManager) -> polkadot_rpc::RpcExtension,
impl Fn(
polkadot_rpc::DenyUnsafe,
polkadot_rpc::SubscriptionTaskExecutor,
) -> polkadot_rpc::RpcExtension,
(
babe::BabeBlockImport<
Block, FullClient<RuntimeApi, Executor>, FullGrandpaBlockImport<RuntimeApi, Executor>
@@ -213,7 +216,7 @@ pub fn new_partial<RuntimeApi, Executor>(config: &mut Configuration, test: bool)
let transaction_pool = transaction_pool.clone();
let select_chain = select_chain.clone();
move |deny_unsafe, subscriptions| -> polkadot_rpc::RpcExtension {
move |deny_unsafe, subscription_executor| -> polkadot_rpc::RpcExtension {
let deps = polkadot_rpc::FullDeps {
client: client.clone(),
pool: transaction_pool.clone(),
@@ -228,7 +231,7 @@ pub fn new_partial<RuntimeApi, Executor>(config: &mut Configuration, test: bool)
shared_voter_state: shared_voter_state.clone(),
shared_authority_set: shared_authority_set.clone(),
justification_stream: justification_stream.clone(),
subscriptions,
subscription_executor,
},
};