Skip to content

Conversation

@shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Jan 13, 2026

Allows to pass a path that has query arguments in it but the file itself still has a valid extension. Additionally, displays an ETA.

@shekhirin shekhirin added C-enhancement New feature or request A-cli Related to the reth CLI labels Jan 13, 2026
@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Jan 13, 2026
@shekhirin shekhirin changed the title feat(cli): parse URL path in reth download feat(cli): parse URL path and display ETA in reth download Jan 13, 2026
@shekhirin shekhirin marked this pull request as ready for review January 14, 2026 09:46
@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Jan 14, 2026
@shekhirin shekhirin added this pull request to the merge queue Jan 14, 2026
Copy link
Collaborator

@pepyakin pepyakin left a comment

Choose a reason for hiding this comment

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

fine by me

let elapsed = self.started_at.elapsed();
let eta = if self.downloaded > 0 {
let remaining = self.total_size.saturating_sub(self.downloaded);
let speed = self.downloaded as f64 / elapsed.as_secs_f64();
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it guaranteed that as_secs will always be greater than 0.0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ye, should be ok

Duration::ZERO
}
} else {
Duration::ZERO
Copy link
Collaborator

Choose a reason for hiding this comment

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

do I understand it right that if it does not really progress then the duration is going to be displayed as 0sec?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, we can also do ∞ but I think doesn't matter

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 14, 2026
@shekhirin shekhirin added this pull request to the merge queue Jan 14, 2026
Merged via the queue into main with commit 665a0a8 Jan 14, 2026
46 checks passed
@shekhirin shekhirin deleted the alexey/reth-download-url-path branch January 14, 2026 10:11
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Related to the reth CLI C-enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants