Skip to content

Commit

Permalink
rename QuicMappedAddrs to NodeIdMappedAddr and add IpMappedAddr
Browse files Browse the repository at this point in the history
also fix weird rebase errors
  • Loading branch information
“ramfox” committed Jan 3, 2025
1 parent a021ca4 commit 59b2744
Show file tree
Hide file tree
Showing 5 changed files with 348 additions and 227 deletions.
2 changes: 1 addition & 1 deletion iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ webpki = { package = "rustls-webpki", version = "0.102" }
webpki-roots = "0.26"
x509-parser = "0.16"
z32 = "1.0.3"
net-report = { package = "iroh-net-report", path = "../iroh-net-report", version = "0.29", default-features = false }
net-report = { package = "iroh-net-report", path = "../iroh-net-report", version = "0.30", default-features = false }

# metrics
iroh-metrics = { version = "0.30", default-features = false }
Expand Down
7 changes: 3 additions & 4 deletions iroh/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use crate::{
dns::DnsDiscovery, pkarr::PkarrPublisher, ConcurrentDiscovery, Discovery, DiscoveryTask,
},
dns::{default_resolver, DnsResolver},
magicsock::{self, Handle, QuicMappedAddr},
magicsock::{self, Handle, NodeIdMappedAddr},
tls,
watchable::Watcher,
};
Expand Down Expand Up @@ -536,7 +536,6 @@ impl Endpoint {
async fn bind(static_config: StaticConfig, msock_opts: magicsock::Options) -> Result<Self> {
let msock = magicsock::MagicSock::spawn(msock_opts).await?;
trace!("created magicsock");
trace!("created quinn endpoint");
debug!(version = env!("CARGO_PKG_VERSION"), "iroh Endpoint created");
let ep = Self {
msock: msock.clone(),
Expand Down Expand Up @@ -637,7 +636,7 @@ impl Endpoint {
&self,
node_id: NodeId,
alpn: &[u8],
addr: QuicMappedAddr,
addr: NodeIdMappedAddr,
) -> Result<Connection> {
debug!("Attempting connection...");
let client_config = {
Expand Down Expand Up @@ -1004,7 +1003,7 @@ impl Endpoint {
async fn get_mapping_addr_and_maybe_start_discovery(
&self,
node_addr: NodeAddr,
) -> Result<(QuicMappedAddr, Option<DiscoveryTask>)> {
) -> Result<(NodeIdMappedAddr, Option<DiscoveryTask>)> {
let node_id = node_addr.node_id;

// Only return a mapped addr if we have some way of dialing this node, in other
Expand Down
Loading

0 comments on commit 59b2744

Please sign in to comment.