make import::blk fields public
This commit is contained in:
parent
05ed9567e9
commit
e8f4c054bb
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue