Dcutr#824
Merged
Merged
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## unstable #824 +/- ##
============================================
- Coverage 84.21% 84.21% -0.01%
============================================
Files 87 90 +3
Lines 15125 15239 +114
============================================
+ Hits 12738 12833 +95
- Misses 2387 2406 +19
|
Closed
Co-authored-by: diegomrsantos <diego@status.im>
diegomrsantos
commented
Apr 11, 2023
| import ./helpers | ||
|
|
||
| type | ||
| SwitchStub* = ref object of Switch |
Contributor
Author
There was a problem hiding this comment.
This will be moved to its own file in the HP PR.
Menduist
reviewed
Apr 11, 2023
Menduist
reviewed
Apr 11, 2023
Menduist
reviewed
Apr 11, 2023
Menduist
reviewed
Apr 11, 2023
Menduist
reviewed
Apr 11, 2023
Menduist
reviewed
Apr 11, 2023
Menduist
reviewed
Apr 11, 2023
Menduist
reviewed
Apr 11, 2023
Menduist
reviewed
Apr 11, 2023
|
|
||
| if peerDialableAddrs.len > maxDialableAddrs: | ||
| peerDialableAddrs = peerDialableAddrs[0..<maxDialableAddrs] | ||
| var futs = peerDialableAddrs.mapIt(switch.connect(stream.peerId, @[it], forceDial = true, reuseConnection = false)) |
Co-authored-by: Tanguy <tanguy@status.im>
Co-authored-by: Tanguy <tanguy@status.im>
Menduist
reviewed
Apr 14, 2023
| await conn.writeLp(pb.buffer) | ||
|
|
||
| proc getHolePunchableAddrs*(addrs: seq[MultiAddress]): seq[MultiAddress] = | ||
| addrs.filterIt(TCP.matchPartial(it)) |
Contributor
There was a problem hiding this comment.
Not sure matchPartial is appropriate, it will also match WS addresses, no?
Contributor
Author
There was a problem hiding this comment.
Changed to match.
Menduist
previously approved these changes
Apr 14, 2023
Menduist
left a comment
Contributor
There was a problem hiding this comment.
LGTM expect last comment to check
Menduist
approved these changes
Apr 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR partially implements https://github.com/libp2p/specs/blob/master/relay/DCUtR.md. Currently, only the TCP protocol is supported. Additionally, the unilateral connection upgrade is handled by the Hole Punching service instead.