refactor: relay router and mut relay reserver#392
Open
varex83 wants to merge 7 commits into
Open
Conversation
mskrzypkows
reviewed
May 12, 2026
| match err { | ||
| DialError::LocalPeerId { .. } => Self::LocalPeerId, | ||
| DialError::NoAddresses => Self::NoAddresses, | ||
| DialError::DialPeerConditionFalse(_) => Self::Skipped, |
Contributor
There was a problem hiding this comment.
Will it be correctly handled in the on_dial_failure? It'll retry instead of skipping.
mskrzypkows
reviewed
May 12, 2026
| }; | ||
| /// Builds circuit listen addresses for a relay from its transport | ||
| /// addresses: `/ip4/.../tcp/.../p2p/<relay-id>/p2p-circuit`. | ||
| fn circuit_addrs(relay_id: PeerId, addrs: &[Multiaddr]) -> Vec<Multiaddr> { |
Contributor
There was a problem hiding this comment.
Would be good to have some unit test for this function
mskrzypkows
reviewed
May 12, 2026
| /// Extracts the relay peer id from a circuit listen address of the form | ||
| /// `/.../p2p/<relay-id>/p2p-circuit`. Returns `None` if the address is not | ||
| /// a relay circuit address. | ||
| fn relay_id_from_circuit_addr(addr: &Multiaddr) -> Option<PeerId> { |
mskrzypkows
reviewed
May 12, 2026
| /// Builds circuit dial addresses for reaching `target` through every | ||
| /// currently reserved relay: | ||
| /// `/.../p2p/<relay-id>/p2p-circuit/p2p/<target>`. | ||
| fn peer_circuit_addrs(&self, target: &PeerId) -> Vec<Multiaddr> { |
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.
No description provided.