-
Notifications
You must be signed in to change notification settings - Fork 302
feat(iroh)!: allow dynamic changing of the RelayMap
of an endpoint
#3522
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
base: main
Are you sure you want to change the base?
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3522/docs/iroh/ Last updated: 2025-10-14T15:21:39Z |
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 guess this is fairly reasonable. Can't see anything wrong with it right away.
self.nodes.keys() | ||
pub fn urls<T>(&self) -> T | ||
where | ||
T: FromIterator<RelayUrl>, |
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.
that's... fancy
And maybe a little unfortunate as we're now forcing an allocation. But I guess this is needed because the the inner lock.
} | ||
|
||
fn handle_relay_map_change(&mut self) { | ||
self.re_stun(UpdateReason::RelayMapChange); |
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.
this is like the only thing that is needed, and the test just works? I'm both impressed and surprised!
6aa6834
to
1dd5391
Compare
1dd5391
to
7691912
Compare
7691912
to
8e45460
Compare
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.
LGTM codewise
Description
Closes #3471
Breaking Changes
iroh::Endpoint::insert_relay
iroh::Endpoint::remove_relay
iroh::Endpoint::RelayMap::insert
iroh::Endpoint::RelayMap::remove
iroh_relay::RelayMap::urls
iroh_relay::RelayMap::nodes
iroh_relay::RelayMap::get_node
Notes & open questions
RelayMap
acceptable?