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

netsync: add peerSubscription #2294

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kcalvinalvin
Copy link
Collaborator

peerSubscription is added to Manager which will allow it subscribers to
receive peers through the channel whenever the Manager is aware of a new
peer that it's been connected to. This is useful to alert
query.Workmanager that a new peer that's been connected to is eligible
to download blocks from.

This is a part of #2226 and depends on #2287

query.Peer is used for downloading blocks out of order during headers
first download.  Methods SubscribeRecvMsg() and OnDisconnect() are added
to abide by the interface.
peerSubscription is added to Manager which will allow it subscribers to
receive peers through the channel whenever the Manager is aware of a new
peer that it's been connected to.  This is useful to alert
query.Workmanager that a new peer that's been connected to is eligible
to download blocks from.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 12501238211

Details

  • 2 of 53 (3.77%) changed or added relevant lines in 2 files are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.06%) to 57.21%

Changes Missing Coverage Covered Lines Changed/Added Lines %
netsync/manager.go 0 21 0.0%
peer/peer.go 2 32 6.25%
Files with Coverage Reduction New Missed Lines %
peer/peer.go 6 72.6%
Totals Coverage Status
Change from base Build 12401774722: -0.06%
Covered Lines: 29910
Relevant Lines: 52281

💛 - Coveralls

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