Differentiate between ClosedBlock (can be reopened) and LockedBlock (cannot).

`ClosedBlock`s still keep the pre-finalised state (i.e. state after the last transaction).
`LockedBlock`s do not. New mining algo needs to reopen these `ClosedBlock`s, however enactment
system does not (and `ClosedBlock`s are slower & more hungry), hence the distinction.
This commit is contained in:
Gav Wood
2016-03-27 20:33:23 +02:00
parent 6cac296366
commit 7c5b171e3f
6 changed files with 85 additions and 28 deletions

View File

@@ -147,5 +147,5 @@ fn can_mine() {
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());
assert!(client.try_seal(b.lock(), vec![]).is_ok());
}