chain verifier stub

This commit is contained in:
NikVolf 2016-10-21 18:22:42 +03:00
parent 9ab048acd9
commit e3558fc269
3 changed files with 19 additions and 1 deletions

View File

@ -25,7 +25,7 @@ const _COL_RESERVED6: u32 = 10;
const DB_VERSION: u32 = 1;
/// Blockchain storage interface
pub trait Store {
pub trait Store : Send + Sync {
/// resolves hash by block number
fn block_hash(&self, number: u64) -> Option<H256>;

View File

@ -0,0 +1,17 @@
//! Bitcoin chain verifier
use std::sync::Arc;
use db;
use chain;
use super::{Verify, VerificationResult, Chain};
struct ChainVerifier {
store: Arc<db::Store>,
}
impl Verify for ChainVerifier {
fn verify(&self, block: &chain::Block) -> VerificationResult {
Ok(Chain::Main)
}
}

View File

@ -13,6 +13,7 @@ extern crate ethcore_devtools as devtools;
extern crate test_data;
mod queue;
mod chain_verifier;
pub use queue::Queue;