-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
holepunch: add multiaddress filter #1839
holepunch: add multiaddress filter #1839
Conversation
6aacf6a
to
0a3f9cf
Compare
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
0a3f9cf
to
b9e0bec
Compare
p2p/protocol/holepunch/filter.go
Outdated
// It also allows to only consider a subset of received multi addresses | ||
// that remote peers announced to us. | ||
// Theoretically, this API also allows to add multi addresses in both cases. | ||
func WithAddrFilter(maf AddrFilter) Option { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inconsistently referring to the multiaddress filter as AddrFilter
or just filter
(see L16) 🤷♂️
eb275c4
to
ce34fcb
Compare
Code LGTM, but CI still seems unhappy. |
@dennis-tra Can you take a look at this? |
@marten-seemann I don't get why CI is so angry at me #worksonmymachine There was indeed a failing test that I have fixed. Now, when I run the The error is:
Could it be that there's an other interfering test? Perhaps a mocked host not closed? |
That sounds like a flaky test. Go runs the tests from different packages in separate binaries, so it shouldn't be possible that tests from another package influence your holepunching tests. |
@dennis-tra Looks like there was a race condition in the test. I added a fix in dennis-tra#1, but since this is in your fork, I can't apply it here. Can you please that PR? |
@marten-seemann CI seems to be happier - but not quite super happy. Some crypto test is still failing:
Seems to be an unrelated test. Would it suffice to rerun the Go Cryto test and hope that it then works? 🤞 |
This PR adds a new option to the holepunch service that allows filtering of multi addresses during the DCUtR protocol.