celestiaorg / go-header

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

feat(peer-tracker): add minAmount of peers tracked in tracker #139

Closed walldiss closed 9 months ago

walldiss commented 9 months ago

Adds minPeerTrackerSizeBeforeGC setting to peer tracker, that specifies the min amount of peers before the peerTracker starts removing peers.

codecov-commenter commented 9 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (28ff21c) 63.60% compared to head (30b2efd) 63.71%.

Files Patch % Lines
p2p/peer_tracker.go 94.28% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #139 +/- ## ========================================== + Coverage 63.60% 63.71% +0.11% ========================================== Files 39 39 Lines 3366 3382 +16 ========================================== + Hits 2141 2155 +14 - Misses 1060 1061 +1 - Partials 165 166 +1 ```

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

Wondertan commented 9 months ago

@vgonkivs and I discussed completely removing GC as a solution and significantly simplifying the exchange. Unfortunately, we didn't note other essential details, so I am happy to merge this as a quick fix with the proper one coming afterward. Likely when @vgonkivs is back