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

deprioritize unspecified addresses in mock connections #887

Merged
merged 1 commit into from Apr 14, 2020

Conversation

willscott
Copy link
Contributor

slightly less naive address selection.

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

LGTM but really, we should just resolve unspecified addresses at a higher layer.

@willscott
Copy link
Contributor Author

The underlying issue is that .Addrs() has an overloaded meaning: if i want to know where i'm listening / what my potential source addresses are, the unspecified address is sometimes relevant. if it's in this context / in terms of addresses i'm announcing to others, than it stop being meaningful.

@willscott willscott merged commit 6f4961b into master Apr 14, 2020
@willscott willscott deleted the feat/betterMockAddresses branch April 14, 2020 20:55
@Stebalien
Copy link
Member

If you want to know where you're listening, you usually use host.Network().ListenAddresses(). peerstore.Addrs(peer) should return dialable addresses.

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