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 -3
View File
@@ -25,11 +25,11 @@ fn should_return_header() {
parent_hash: 0.into(),
number: 0,
state_root: 0.into(),
transaction_root: Default::default(),
extrinsics_root: Default::default(),
digest: Default::default(),
};
let client = client::new_in_mem(executor::WasmExecutor, || (test_genesis_block.clone(), vec![])).unwrap();
let client = Arc::new(client::new_in_mem(executor::WasmExecutor, || (test_genesis_block.clone(), vec![])).unwrap());
assert_matches!(
ChainApi::header(&client, test_genesis_block.blake2_256().into()),
@@ -37,7 +37,7 @@ fn should_return_header() {
parent_hash: 0.into(),
number: 0,
state_root: 0.into(),
transaction_root: Default::default(),
extrinsics_root: Default::default(),
digest: Default::default(),
}
);