diff --git a/bencher/src/main.rs b/bencher/src/main.rs index bd177364..f39be189 100644 --- a/bencher/src/main.rs +++ b/bencher/src/main.rs @@ -6,6 +6,7 @@ extern crate time; extern crate verification; extern crate network; extern crate byteorder; +extern crate primitives; mod database; mod verifier; diff --git a/bencher/src/verifier.rs b/bencher/src/verifier.rs index c9a5f02b..3eb8fbda 100644 --- a/bencher/src/verifier.rs +++ b/bencher/src/verifier.rs @@ -1,11 +1,12 @@ use std::sync::Arc; use devtools::RandomTempPath; -use db::{Storage, BlockStapler}; +use db::{Storage, BlockStapler, Store}; use chain::IndexedBlock; use verification::{BackwardsCompatibleChainVerifier as ChainVerifier, Verify}; use network::Magic; use test_data; use byteorder::{LittleEndian, ByteOrder}; +use primitives::Compact; use super::Benchmark; @@ -84,11 +85,19 @@ pub fn main(benchmark: &mut Benchmark) { builder = tx_builder.output().value(0).build().build() } - verification_blocks.push(builder.merkled_header().parent(rolling_hash.clone()).build().build().into()); + verification_blocks.push( + builder + .merkled_header() + .parent(rolling_hash.clone()) + .bits(Compact::new(486604799)) + .build() + .build() + .into()); } let store = Arc::new(Storage::new(path.as_path()).unwrap()); + assert_eq!(store.best_block().unwrap().hash, rolling_hash); let chain_verifier = ChainVerifier::new(store.clone(), Magic::Mainnet).pow_skip();