Add missing RPC required for relay (#57)

* add missing RPC required for relay

* cargo fmt --all
This commit is contained in:
Svyatoslav Nikolsky
2020-04-07 15:50:02 +03:00
committed by Bastian Köcher
parent 1da78b8ab4
commit b055027161
4 changed files with 34 additions and 0 deletions
+11
View File
@@ -12,6 +12,7 @@ name = "bridge-node"
[dependencies]
futures = "0.3.1"
jsonrpc-core = "14.0.3"
log = "0.4.8"
structopt = "0.3.12"
bridge-node-runtime = { version = "0.1.0", path = "../runtime" }
@@ -22,6 +23,11 @@ version = "0.8.0-alpha.2"
rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31"
git = "https://github.com/paritytech/substrate.git"
[dependencies.sc-rpc]
version = "2.0.0-alpha.2"
rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31"
git = "https://github.com/paritytech/substrate.git"
[dependencies.sp-core]
version = "2.0.0-alpha.2"
rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31"
@@ -99,6 +105,11 @@ version = "0.8.0-alpha.2"
rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31"
git = "https://github.com/paritytech/substrate.git"
[dependencies.substrate-frame-rpc-system]
version = "2.0.0-alpha.2"
rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31"
git = "https://github.com/paritytech/substrate.git"
[build-dependencies]
vergen = "3.1.0"
+10
View File
@@ -80,6 +80,16 @@ macro_rules! new_full_start {
import_setup = Some((grandpa_block_import, grandpa_link));
Ok(import_queue)
})?
.with_rpc_extensions(|builder| -> Result<jsonrpc_core::IoHandler<sc_rpc::Metadata>, _> {
use substrate_frame_rpc_system::{FullSystem, SystemApi};
let mut io = jsonrpc_core::IoHandler::default();
io.extend_with(SystemApi::to_delegate(FullSystem::new(
builder.client().clone(),
builder.pool(),
)));
Ok(io)
})?;
(builder, import_setup, inherent_data_providers)