Add a message for download progress

This commit is contained in:
Roman Zeyde 2018-06-09 18:22:57 +03:00
parent 946bff4c0e
commit 5dcee078be
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB
2 changed files with 2 additions and 0 deletions

View File

@ -316,6 +316,7 @@ impl Daemon {
let chunk_size = 100_000;
let mut result = vec![];
let mut bar = util::new_progress_bar(all_heights.len());
bar.message("Headers: ");
let null_hash = Sha256dHash::default();
for heights in all_heights.chunks(chunk_size) {
let mut headers = self.getblockheaders(&heights)?;

View File

@ -287,6 +287,7 @@ impl Index {
let mut buf = BufferedWriter::new(store);
let mut bar = util::new_progress_bar(new_headers.len());
bar.message("Blocks: ");
let mut txns_count = 0;
for header in &new_headers {
// Download a new block