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

feat: expose WANActive #580

Merged
merged 1 commit into from
Apr 10, 2020
Merged

feat: expose WANActive #580

merged 1 commit into from
Apr 10, 2020

Conversation

Stebalien
Copy link
Member

That way, external users can easily determine which DHT they should use. E.g., in go-ipfs, I'd like to call GetClosestPeers in the ipfs dht commands based on the "active" DHT.

That way, external users can easily determine which DHT they should use. E.g.,
in go-ipfs, I'd like to call GetClosestPeers in the `ipfs dht` commands based on
the "active" DHT.
@Stebalien Stebalien requested a review from willscott April 9, 2020 20:37
@willscott
Copy link
Contributor

alternative would be to add an ActiveDHT() *IpfsDHT method

@Stebalien
Copy link
Member Author

Well, they're both active, sort of.

@Stebalien Stebalien merged commit 6b94711 into master Apr 10, 2020
@Stebalien
Copy link
Member Author

Merging this one as it's cleaner to get the active DHT by checking WANActive then pulling out the WAN DHT than it is to determine if the WAN DHT is active by comparing d.ActiveDHT() == d.WAN (IMO).

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