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

RT peer validation should also include support for the DHT protocol #497

Merged
merged 3 commits into from
Mar 24, 2020

Conversation

aarshkshah1992
Copy link
Contributor

@aarshkshah1992 aarshkshah1992 changed the base branch from master to cypress March 19, 2020 12:58
func makeRoutingTable(h host.Host, cfg config) (*kb.RoutingTable, error) {
self := kb.ConvertPeerID(h.ID())
func makeRoutingTable(dht *IpfsDHT, cfg config) (*kb.RoutingTable, error) {
self := kb.ConvertPeerID(dht.host.ID())
// construct the routing table with a peer validation function
pvF := func(c context.Context, p peer.ID) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

this change looks fine to me.

At some point, we should declare the pvF as a normal method of the DHT, rather than creating it as an anonymous function in makeRoutingTable, which ought to simplify some of these references.

@aarshkshah1992
Copy link
Contributor Author

@aschmahmann Merging this. Lmk if you have issues & I can address them.

@aarshkshah1992 aarshkshah1992 merged commit e56c237 into cypress Mar 24, 2020
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