Extrinsics PubSub (#349)

* Extrinsic subscriptions.

* Handle RPC errors better.

* Add tests for extrinsics and unignored others.

* Handle client errors.

* Fix compilation.
This commit is contained in:
Tomasz Drwięga
2018-07-17 23:57:08 +02:00
committed by Gav Wood
parent 7dcbf77c9d
commit 7ce2a8552f
19 changed files with 278 additions and 71 deletions
+3 -3
View File
@@ -221,7 +221,7 @@ pub fn run<I, T, W>(args: I, worker: W) -> error::Result<()> where
info!("Starting collator");
// TODO [rob]: collation node implementation
// This isn't a thing. Different parachains will have their own collator executables and
// maybe link to libpolkadot to get a light-client.
// maybe link to libpolkadot to get a light-client.
service::Roles::LIGHT
} else if matches.is_present("light") {
info!("Starting (light)");
@@ -478,9 +478,9 @@ fn run_until_exit<C, W>(
let ws_address = parse_address("127.0.0.1:9944", "ws-port", matches)?;
let handler = || {
let client = (&service as &substrate_service::Service<C>).client();
let client = substrate_service::Service::client(&service);
let chain = rpc::apis::chain::Chain::new(client.clone(), executor.clone());
let author = rpc::apis::author::Author::new(client.clone(), service.extrinsic_pool());
let author = rpc::apis::author::Author::new(client.clone(), service.extrinsic_pool(), executor.clone());
rpc::rpc_handler::<service::ComponentBlock<C>, _, _, _, _>(
client,
chain,