chain info test
This commit is contained in:
parent
253f56afe1
commit
b8c2f9cf15
@ -88,9 +88,6 @@ fn imports_from_empty() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn imports_good_block() {
|
fn imports_good_block() {
|
||||||
|
|
||||||
::env_logger::init().ok();
|
|
||||||
|
|
||||||
let client = Client::new(get_test_spec(), &get_random_temp_dir(), IoChannel::disconnected()).unwrap();
|
let client = Client::new(get_test_spec(), &get_random_temp_dir(), IoChannel::disconnected()).unwrap();
|
||||||
|
|
||||||
let good_block = get_good_dummy_block();
|
let good_block = get_good_dummy_block();
|
||||||
@ -123,3 +120,12 @@ fn query_bad_block() {
|
|||||||
|
|
||||||
assert!(bad_block.is_none());
|
assert!(bad_block.is_none());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn returns_chain_info() {
|
||||||
|
let dummy_block = get_good_dummy_block();
|
||||||
|
let client = get_test_client_with_blocks(vec![dummy_block.clone()]);
|
||||||
|
let block = BlockView::new(&dummy_block);
|
||||||
|
let info = client.chain_info();
|
||||||
|
assert_eq!(info.best_block_hash, block.header().hash());
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user