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

fix(p2p/session): return peer to the queue in case of ErrNotFound #159

Closed vgonkivs closed 4 months ago

vgonkivs commented 4 months ago

Overview

Current PR fixing a case when the peerQueue becomes empty if all other peers are currently syncing. We had an incorrect assumption and didn't give a second chance to peers who were syncing. Also, removed tracked peers pruning by score.

Tested on robusta for 1 week. The network looks stable and healthy.

Checklist

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 62.90%. Comparing base (aecd7cf) to head (01e5e08).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #159 +/- ## ========================================== - Coverage 63.01% 62.90% -0.11% ========================================== Files 39 39 Lines 3593 3577 -16 ========================================== - Hits 2264 2250 -14 + Misses 1155 1154 -1 + Partials 174 173 -1 ```

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