celestiaorg / go-header

Go library with all the services needed to request, sync and store blockchain headers.
Apache License 2.0
17 stars 16 forks source link

chore(sync)!: Rename `unrecentHead` to `outdatedHead` in metrics + clean up `Head` func a bit #163

Closed renaynay closed 3 months ago

renaynay commented 3 months ago

This PR renames a poorly named metric from unrecent_header to outdated_head which is more descriptive / accurate.

It also cleans up a bit of the code inside of sync_head.go.

This PR is meant to override #162 if we agree that the timeout should not be configurable (see comment

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 54.54545% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 62.85%. Comparing base (cb11d8c) to head (ce20115).

Files Patch % Lines
sync/metrics.go 16.66% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #163 +/- ## ========================================== - Coverage 62.90% 62.85% -0.05% ========================================== Files 39 39 Lines 3577 3578 +1 ========================================== - Hits 2250 2249 -1 - Misses 1154 1156 +2 Partials 173 173 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.