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(p2p/session): return peer to the queue in case of ErrNotFound #159

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

vgonkivs
Copy link
Member

@vgonkivs vgonkivs commented Feb 23, 2024

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

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

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

I'm fine with this change. We should clean up session at some point though.

p2p/session.go Show resolved Hide resolved
@vgonkivs vgonkivs merged commit e2197d9 into main Feb 26, 2024
4 checks passed
@vgonkivs vgonkivs deleted the fix_peer_session branch February 26, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants