Skip to content

Conversation

@divagant-martian
Copy link
Contributor

Issue Addressed

#1856

Proposed Changes

  • For clarity, the router's processor now only decides if a peer is compatible and it disconnects it or sends it to sync accordingly. No logic here regarding how useful is the peer.
  • Update peer_sync_info's rules
  • Add an IrrelevantPeer sync status to account for incompatible peers (maybe this should be "IncompatiblePeer" now that I think about it?) this state is update upon receiving an internal goodbye in the peer manager
  • Misc code cleanups
  • Reduce the need to create StatusMessages (and thus, Arc accesses )
  • Add missing calls to update the global sync state

The overall effect should be:

  • More peers recognized as Behind, and less as Unknown
  • Peers identified as incompatible

Copy link
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

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

This looks much cleaner. Nice, few minor comments

divagant-martian and others added 2 commits November 13, 2020 04:22
Co-authored-by: Age Manning <Age@AgeManning.com>
Copy link
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

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

LGTM

@AgeManning
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Nov 13, 2020
## Issue Addressed
#1856 

## Proposed Changes
- For clarity, the router's processor now only decides if a peer is compatible and it disconnects it or sends it to sync accordingly. No logic here regarding how useful is the peer. 
- Update peer_sync_info's rules
- Add an `IrrelevantPeer` sync status to account for incompatible peers (maybe this should be "IncompatiblePeer" now that I think about it?) this state is update upon receiving an internal goodbye in the peer manager
- Misc code cleanups
- Reduce the need to create `StatusMessage`s (and thus, `Arc` accesses )
- Add missing calls to update the global sync state

The overall effect should be:
- More peers recognized as Behind, and less as Unknown
- Peers identified as incompatible
@bors
Copy link

bors bot commented Nov 13, 2020

@bors bors bot changed the title Misc Peer sync info adjustments [Merged by Bors] - Misc Peer sync info adjustments Nov 13, 2020
@bors bors bot closed this Nov 13, 2020
@divagant-martian divagant-martian deleted the peer-sync-info-centralized branch January 4, 2021 08:32
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.

2 participants