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 invalid sync percentage display in query tip #851

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

carbolymer
Copy link
Contributor

@carbolymer carbolymer commented Jul 29, 2024

Changelog

- description: |
    Fix invalid sync percentage display in `query tip`
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
   - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
   - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

the now time and tip time were flipped, hence the syncProgress was shown always as 100%

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

Nice catch!

@@ -299,7 +299,7 @@ runQueryTipCmd

let tolerance = RelativeTime (secondsToNominalDiffTime 600)

return $ percentage tolerance nowSeconds tipTimeResult
return $ percentage tolerance tipTimeResult nowSeconds
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah so the arguments needed to be swapped.

@carbolymer carbolymer added this pull request to the merge queue Jul 30, 2024
Merged via the queue into main with commit c861319 Jul 30, 2024
25 of 26 checks passed
@carbolymer carbolymer deleted the mgalazyn/fix/invalid-sync-percentage branch July 30, 2024 08:34
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