Skip to content
Snippets Groups Projects

WIP: sync print 1 block apply when no blocks applied

Closed Hugo Trentesaux requested to merge hugo/wip into dev
3 unresolved threads
2 files
+ 5
6
Compare changes
  • Side-by-side
  • Inline

Files

@@ -209,12 +209,9 @@ pub fn local_sync<DC: DuniterConf>(profile: &str, conf: &DC, sync_opts: SyncOpt)
@@ -209,12 +209,9 @@ pub fn local_sync<DC: DuniterConf>(profile: &str, conf: &DC, sync_opts: SyncOpt)
let sync_start_time = SystemTime::now();
let sync_start_time = SystemTime::now();
// Count number of blocks and chunks
// Count number of blocks and chunks
let count_blocks = target_blockstamp.id.0 + 1 - current_blockstamp.id.0;
let count_blocks = target_blockstamp.id.0 - current_blockstamp.id.0;
let count_chunks = if count_blocks % 250 > 0 {
let count_chunks = count_blocks / 250 + 1;
(count_blocks / 250) + 1
} else {
count_blocks / 250
};
println!(
println!(
"Sync from #{} to #{} :",
"Sync from #{} to #{} :",
current_blockstamp.id.0, target_blockstamp.id.0
current_blockstamp.id.0, target_blockstamp.id.0
Loading