ongoing experiments
This commit is contained in:
parent
a3637c8432
commit
d6e001089a
|
@ -6,6 +6,7 @@ extern crate time;
|
||||||
extern crate verification;
|
extern crate verification;
|
||||||
extern crate network;
|
extern crate network;
|
||||||
extern crate byteorder;
|
extern crate byteorder;
|
||||||
|
extern crate primitives;
|
||||||
|
|
||||||
mod database;
|
mod database;
|
||||||
mod verifier;
|
mod verifier;
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use devtools::RandomTempPath;
|
use devtools::RandomTempPath;
|
||||||
use db::{Storage, BlockStapler};
|
use db::{Storage, BlockStapler, Store};
|
||||||
use chain::IndexedBlock;
|
use chain::IndexedBlock;
|
||||||
use verification::{BackwardsCompatibleChainVerifier as ChainVerifier, Verify};
|
use verification::{BackwardsCompatibleChainVerifier as ChainVerifier, Verify};
|
||||||
use network::Magic;
|
use network::Magic;
|
||||||
use test_data;
|
use test_data;
|
||||||
use byteorder::{LittleEndian, ByteOrder};
|
use byteorder::{LittleEndian, ByteOrder};
|
||||||
|
use primitives::Compact;
|
||||||
|
|
||||||
use super::Benchmark;
|
use super::Benchmark;
|
||||||
|
|
||||||
|
@ -84,11 +85,19 @@ pub fn main(benchmark: &mut Benchmark) {
|
||||||
builder = tx_builder.output().value(0).build().build()
|
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());
|
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();
|
let chain_verifier = ChainVerifier::new(store.clone(), Magic::Mainnet).pow_skip();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue