Skip to content

Commit

Permalink
fix: small display bug (#3257)
Browse files Browse the repository at this point in the history
Description
---
The escape sequence was eating up the string "Starting recovery at height: ".

How Has This Been Tested?
---
Manually/visually.
  • Loading branch information
Cifko authored Aug 30, 2021
1 parent 9dc335f commit d1bb737
Showing 1 changed file with 4 additions and 4 deletions.
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(())
}

0 comments on commit d1bb737

Please sign in to comment.