Integration of target calculation with header validation and pow. Enforce strictly progessing time.

This commit is contained in:
Ignotus Peverell
2016-11-16 17:03:23 -08:00
parent ca26f0c3f7
commit 1e5ff0eeff
4 changed files with 49 additions and 13 deletions
+4 -1
View File
@@ -15,7 +15,7 @@
//! Base types that the block chain pipeline requires.
use core::core::hash::Hash;
use core::core::Block;
use core::core::{Block, BlockHeader};
use core::ser;
/// The lineage of a fork, defined as a series of numbers. Each new branch gets
@@ -137,6 +137,9 @@ pub trait ChainStore {
/// Get the tip that's also the head of the chain
fn head(&self) -> Result<Tip, Error>;
/// Gets a block header by hash
fn get_block_header(&self, h: &Hash) -> Result<BlockHeader, Error>;
/// Save the provided block in store
fn save_block(&self, b: &Block) -> Result<(), Error>;