RpcHandlers Refactorings (#6846)

* allow access to the underlying Pubsub instance from RpcHandlers

* bump Cargo.lock

* no more Arc<RpcHandlers>

* bump Cargo.lock

* Debug,.

* Arc<RpcHandlers>

* RpcHandler

* RpcHandlers::io_handler

* remove chain spec from cli

* address pr comments

* remove stray newline

Co-authored-by: Ashley <ashley.ruglys@gmail.com>

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
Co-authored-by: Ashley <ashley.ruglys@gmail.com>
This commit is contained in:
Seun Lanlege
2020-08-15 10:08:31 +01:00
committed by GitHub
parent 6611019e2e
commit 6c1737fe77
7 changed files with 21 additions and 10 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ use wasm_bindgen::prelude::*;
use futures::{
prelude::*, channel::{oneshot, mpsc}, compat::*, future::{ready, ok, select}
};
use std::{sync::Arc, pin::Pin};
use std::pin::Pin;
use sc_chain_spec::Extension;
use libp2p_wasm_ext::{ExtTransport, ffi};
@@ -124,7 +124,7 @@ struct RpcMessage {
}
/// Create a Client object that connects to a service.
pub fn start_client(mut task_manager: TaskManager, rpc_handlers: Arc<RpcHandlers>) -> Client {
pub fn start_client(mut task_manager: TaskManager, rpc_handlers: RpcHandlers) -> Client {
// We dispatch a background task responsible for processing the service.
//
// The main action performed by the code below consists in polling the service with