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

add peer tracker to porcelain with Trust method #3408

Closed
wants to merge 1 commit into from

Conversation

frrist
Copy link
Member

@frrist frrist commented Sep 11, 2019

What

This adds the PeerTracker to porcelain. We need this for catch up syncing daemon tests as we must instruct daemons to trust each other in order for them to sync their chains initially. Without this daemons will be unable to move out of the catch up sync phase.

@frrist frrist self-assigned this Sep 11, 2019
@@ -69,6 +69,14 @@ func (tracker *PeerTracker) UpdateTrusted(ctx context.Context) error {
return tracker.updatePeers(ctx, tracker.trustedPeers()...)
}

// Trust adds `pid` to the peer trackers trusted node set.
func (tracker *PeerTracker) Trust(pid peer.ID) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to include an Untrust as well? If I were playing around with this on the CLI I wouldn't want to make a change I couldn't undo.

@frrist
Copy link
Member Author

frrist commented Sep 11, 2019

Realizing this might now be ideal as the peers passed to peer tracker as "trusted" are not persisted to disk. Going to revisit at a later point.

@frrist frrist closed this Sep 11, 2019
@zl03jsj zl03jsj deleted the feat/peertracker-porcelain branch July 14, 2022 09:49
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.

None yet

2 participants