Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: small display bug #3257

Merged
merged 2 commits into from
Aug 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions applications/tari_base_node/src/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ async fn do_recovery<D: BlockchainBackend + 'static>(
db.add_block(Arc::new(block))
.await
.map_err(|e| anyhow!("Stopped recovery at height {}, reason: {}", counter, e))?;
counter += 1;
if counter > max_height {
info!(target: LOG_TARGET, "Done with recovery, chain height {}", counter - 1);
if counter >= max_height {
info!(target: LOG_TARGET, "Done with recovery, chain height {}", counter);
break;
}
print!("\x1B[{}D\x1B[K", (counter + 1).to_string().chars().count());
print!("\x1B[{}D\x1B[K", counter.to_string().len());
counter += 1;
}
Ok(())
}