Refactor pending_block to always return invalid txs and sometimes a block.

Docuemnt SealingWork properly.
This commit is contained in:
Gav Wood
2016-03-23 16:28:02 +00:00
parent 97449afbb9
commit 4e013ba2fc
7 changed files with 126 additions and 68 deletions

View File

@@ -144,7 +144,7 @@ fn can_mine() {
let client_result = get_test_client_with_blocks(vec![dummy_blocks[0].clone()]);
let client = client_result.reference();
let b = client.prepare_sealing(Address::default(), x!(31415926), vec![], vec![]).unwrap().0;
let b = client.prepare_sealing(Address::default(), x!(31415926), vec![], vec![]).0.unwrap();
assert_eq!(*b.block().header().parent_hash(), BlockView::new(&dummy_blocks[0]).header_view().sha3());
assert!(client.try_seal(b, vec![]).is_ok());