diff --git a/cumulus/polkadot-parachain/src/rpc.rs b/cumulus/polkadot-parachain/src/rpc.rs index 283a73d931d7..feb2ae912fe0 100644 --- a/cumulus/polkadot-parachain/src/rpc.rs +++ b/cumulus/polkadot-parachain/src/rpc.rs @@ -41,6 +41,7 @@ pub(crate) trait BuildRpcExtensions { client: Arc, backend: Arc, pool: Arc, + chain_spec: Box, ) -> sc_service::error::Result; } @@ -60,6 +61,7 @@ where _client: Arc>, _backend: Arc, _pool: Arc>>, + _chain_spec: Box, ) -> sc_service::error::Result { Ok(RpcExtension::new(())) } @@ -83,6 +85,7 @@ where client: Arc>, backend: Arc, pool: Arc>>, + chain_spec: Box, ) -> sc_service::error::Result { let build = || -> Result> { let mut module = RpcExtension::new(()); diff --git a/cumulus/polkadot-parachain/src/service.rs b/cumulus/polkadot-parachain/src/service.rs index 80698a2d7115..03aa5ce8401d 100644 --- a/cumulus/polkadot-parachain/src/service.rs +++ b/cumulus/polkadot-parachain/src/service.rs @@ -255,6 +255,7 @@ pub(crate) trait NodeSpec { let validator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); + let chain_spec = parachain_config.chain_spec.cloned(); let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); let net_config = FullNetworkConfiguration::<_, _, Net>::new( @@ -281,12 +282,13 @@ pub(crate) trait NodeSpec { let transaction_pool = transaction_pool.clone(); let backend_for_rpc = backend.clone(); - Box::new(move |deny_unsafe, _| { + Box::new(move |deny_unsafe: sc_rpc::DenyUnsafe, _| { Self::BuildRpcExtensions::build_rpc_extensions( deny_unsafe, client.clone(), backend_for_rpc.clone(), transaction_pool.clone(), + chain_spec, ) }) };