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

blockmanager: remove serverPeer from blockmanager completely. #1735

Merged
merged 1 commit into from
Oct 24, 2019

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented May 7, 2019

This is a port of btcd 989

The purpose is to remove the dependency of blockmanager on serverPeer, which is defined in the main package. Instead, we split out some of the fields from serverPeer into a separate struct called peerSyncState in blockmanager.go. While they are in the same package now, this change makes it easier to move blockManager into its own package along with peerSyncState. The blockManager tracks a map of Peer pointers to the peer state and keeps it updated as peers connect and disconnect.

@davecgh davecgh added this to the 1.6.0 milestone Oct 19, 2019
Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

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

This need a rebase, but I gave it a preliminary review and I noticed that the requestedTxns and requestedBlocks fields have not been removed from serverPeer as was done in the upstream commit this is porting.

@dnldd dnldd force-pushed the merge_serverpeer_decomposition branch from 596474a to 41001d8 Compare October 23, 2019 19:51
@dnldd dnldd force-pushed the merge_serverpeer_decomposition branch from 41001d8 to 3499bcd Compare October 24, 2019 00:26
The purpose is to remove the dependency of blockmanager on serverPeer,
which is defined in the main package. Instead, we split out some of
the fields from serverPeer into a separate struct called peerSyncState
in blockmanager.go. While they are in the same package now, this
change makes it easier to move blockManager into its own package along
with peerSyncState. The blockManager tracks a map of Peer pointers to
the peer state and keeps it updated as peers connect and disconnect.
@dnldd dnldd force-pushed the merge_serverpeer_decomposition branch from 3499bcd to ac77bbf Compare October 24, 2019 00:31
@davecgh davecgh merged commit 5e1fbdf into decred:master Oct 24, 2019
@davecgh davecgh mentioned this pull request Dec 9, 2020
33 tasks
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