make import::blk fields public

This commit is contained in:
debris 2016-10-31 03:30:49 +01:00
parent 05ed9567e9
commit e8f4c054bb
2 changed files with 5 additions and 4 deletions

View File

@ -5,9 +5,9 @@ use chain;
#[derive(Debug, PartialEq)]
pub struct Block {
magic: H32,
block_size: u32,
block: chain::Block,
pub magic: H32,
pub block_size: u32,
pub block: chain::Block,
}
impl Deserializable for Block {

View File

@ -56,7 +56,7 @@ fn init_db(db: &Arc<db::Store>) {
}
fn import_blockchain(db_path: &str) {
for _block in import::open_blk_dir(db_path).expect("TODO") {
for (_i, _blk) in import::open_blk_dir(db_path).expect("TODO").enumerate() {
// import logic goes here
}
}
@ -68,6 +68,7 @@ fn run() -> Result<(), String> {
if let Some(ref import_path) = cfg.import_path {
import_blockchain(import_path);
return Ok(())
}
let mut el = event_loop();