simplify block module and usage (#10479)

* removed trait IsBlock and simplify block usage

* removed redundant ClosedBlock::hash function
This commit is contained in:
Marek Kotewicz
2019-03-15 13:22:47 +01:00
committed by Andrew Jones
parent d83143d0ba
commit a574df3132
10 changed files with 125 additions and 152 deletions

View File

@@ -27,7 +27,6 @@ use types::filter::Filter;
use types::view;
use types::views::BlockView;
use block::IsBlock;
use client::{BlockChainClient, Client, ClientConfig, BlockId, ChainInfo, BlockInfo, PrepareOpenBlock, ImportSealedBlock, ImportBlock};
use ethereum;
use executive::{Executive, TransactOptions};
@@ -254,7 +253,7 @@ fn can_mine() {
let b = client.prepare_open_block(Address::default(), (3141562.into(), 31415620.into()), vec![]).unwrap().close().unwrap();
assert_eq!(*b.block().header().parent_hash(), view!(BlockView, &dummy_blocks[0]).header_view().hash());
assert_eq!(*b.header.parent_hash(), view!(BlockView, &dummy_blocks[0]).header_view().hash());
}
#[test]