blockchain split into few separate submodules, cleanup insert_block process

This commit is contained in:
debris
2016-02-27 01:37:12 +01:00
parent 6e5ae636cc
commit 53e8d99075
8 changed files with 332 additions and 225 deletions

View File

@@ -0,0 +1,19 @@
use util::hash::H256;
use util::uint::U256;
use header::BlockNumber;
pub struct BlockInfo {
pub hash: H256,
pub number: BlockNumber,
pub total_difficulty: U256,
pub location: BlockLocation
}
pub enum BlockLocation {
CanonChain,
Branch,
BranchBecomingCanonChain {
ancestor: H256,
route: Vec<H256>
}
}