Skip to content

Commit

Permalink
Enable full RPC for parachain
Browse files Browse the repository at this point in the history
  • Loading branch information
akru committed Jan 28, 2022
1 parent 81b96d2 commit ce84efb
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions bin/node/service/src/parachain/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ use sp_runtime::traits::BlakeTwo256;
use sp_trie::PrefixedMemoryDB;
use std::sync::Arc;
use std::time::Duration;
use substrate_frame_rpc_system::{FullSystem, SystemApi};
use substrate_prometheus_endpoint::Registry;

fn new_partial<RuntimeApi, Executor, BIQ>(
Expand Down Expand Up @@ -276,15 +275,14 @@ where

sc_service::spawn_tasks(sc_service::SpawnTasksParams {
rpc_extensions_builder: Box::new(move |deny_unsafe, _| {
let mut io = jsonrpc_core::IoHandler::default();
io.extend_with(SystemApi::to_delegate(FullSystem::new(
rpc_client.clone(),
rpc_pool.clone(),
let deps = robonomics_rpc::FullDeps {
client: rpc_client.clone(),
pool: rpc_pool.clone(),
deny_unsafe,
)));
io.extend_with(PubSubApi::to_delegate(PubSubApi::new(pubsub.clone())));
io.extend_with(ReqRespApi::to_delegate(ReqRespApi {}));
Ok(io)
pubsub: pubsub.clone(),
};

robonomics_rpc::create_full(deps).map_err(Into::into)
}),
client: client.clone(),
transaction_pool: transaction_pool.clone(),
Expand Down

0 comments on commit ce84efb

Please sign in to comment.