From c28dd304617ffe8f5ca592551a29d2be652ea051 Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Wed, 18 Jul 2018 15:03:30 +0200 Subject: [PATCH] Fixed block import (#368) * Fixed decoding from file * Increased progress frequency --- polkadot/cli/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polkadot/cli/src/lib.rs b/polkadot/cli/src/lib.rs index 66a63d3f51..352f513e9e 100644 --- a/polkadot/cli/src/lib.rs +++ b/polkadot/cli/src/lib.rs @@ -430,8 +430,8 @@ fn import_blocks(matches: &clap::ArgMatches, exit: E) -> error::Result<()> None => Box::new(stdin()), }; - info!("Importing blocks"); let count: u32 = Decode::decode(&mut file).ok_or("Error reading file")?; + info!("Importing {} blocks", count); let mut block = 0; for _ in 0 .. count { if exit_recv.try_recv().is_ok() { @@ -448,7 +448,7 @@ fn import_blocks(matches: &clap::ArgMatches, exit: E) -> error::Result<()> } } block += 1; - if block % 10000 == 0 { + if block % 1000 == 0 { info!("#{}", block); } }