Add chain RPCs and getHeader. (#124)

* Add chain RPCs and getHeader.

Also:
- finish renaming transaction -> extrinsic;
- rejig development chain spec to be more useful.

* Fix.

* Remove invalid comments.

* Fix.
This commit is contained in:
Gav Wood
2018-04-13 14:21:32 +02:00
committed by Tomasz Drwięga
parent e9cdd45145
commit 808d762158
12 changed files with 79 additions and 60 deletions
+3 -1
View File
@@ -26,13 +26,15 @@ extern crate jsonrpc_http_server as http;
use std::io;
/// Construct rpc `IoHandler`
pub fn rpc_handler<S, T>(state: S, transaction_pool: T) -> rpc::IoHandler where
pub fn rpc_handler<S, T, C>(state: S, transaction_pool: T, chain: C) -> rpc::IoHandler where
S: apis::state::StateApi,
T: apis::author::AuthorApi,
C: apis::chain::ChainApi,
{
let mut io = rpc::IoHandler::new();
io.extend_with(state.to_delegate());
io.extend_with(transaction_pool.to_delegate());
io.extend_with(chain.to_delegate());
io
}