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

Show a progressbar when downloading tipset headers. #1469

Merged
merged 4 commits into from
Mar 9, 2022

Conversation

lemmih
Copy link
Contributor

@lemmih lemmih commented Mar 8, 2022

Downloading tipset headers can take anywhere from minutes to hours.

Summary of changes
Changes introduced in this pull request:

  • Show a progress bar when headers are downloaded as part of restoring from a snapshot.

Reference issue to close (if applicable)

Other information and links

Downloading tipset headers can take anywhere from minutes to hours.
@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

Merging #1469 (ed288f3) into main (a3c4bf2) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1469      +/-   ##
==========================================
- Coverage   24.27%   24.26%   -0.01%     
==========================================
  Files         311      311              
  Lines       23896    23901       +5     
==========================================
  Hits         5800     5800              
- Misses      18096    18101       +5     
Impacted Files Coverage Δ
blockchain/chain_sync/src/tipset_syncer.rs 0.00% <0.00%> (ø)
forest/src/cli/mod.rs 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3c4bf2...ed288f3. Read the comment docs.

@@ -844,10 +844,17 @@ async fn sync_headers_in_reverse<DB: BlockStore + Sync + Send + 'static>(
parent_tipsets.push(proposed_head.clone());
tracker.write().await.set_epoch(current_head.epoch());

use pbr::ProgressBar;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use those only once, how about either moving them to the top of the file or fully qualifying method calls?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@noot noot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice change!

@lemmih lemmih merged commit beeb078 into main Mar 9, 2022
@lemmih lemmih deleted the lemmih/tipset-header-progressbar branch March 9, 2022 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants