Skip to content

Commit e2e9708

Browse files
committed
Remove best_addr module
1 parent 14e9bb9 commit e2e9708

File tree

4 files changed

+10
-286
lines changed

4 files changed

+10
-286
lines changed

iroh/src/magicsock/node_map.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use stun_rs::TransactionId;
1212
use tracing::{debug, info, instrument, trace, warn};
1313

1414
use self::{
15-
best_addr::ClearReason,
1615
node_state::{NodeState, Options, PingHandled},
16+
path_validity::ClearReason,
1717
};
1818
use super::{metrics::Metrics, ActorMessage, DiscoMessageSource, NodeIdMappedAddr};
1919
#[cfg(any(test, feature = "test-utils"))]
@@ -23,7 +23,6 @@ use crate::{
2323
watchable::Watcher,
2424
};
2525

26-
mod best_addr;
2726
mod node_state;
2827
mod path_state;
2928
mod path_validity;

iroh/src/magicsock/node_map/best_addr.rs

Lines changed: 0 additions & 283 deletions
This file was deleted.

iroh/src/magicsock/node_map/node_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use tokio::sync::mpsc;
1717
use tracing::{debug, event, info, instrument, trace, warn, Level};
1818

1919
use super::{
20-
best_addr::ClearReason,
2120
path_state::{summarize_node_paths, PathState},
21+
path_validity::ClearReason,
2222
udp_paths::{NodeUdpPaths, UdpSendAddr},
2323
IpPort, Source,
2424
};

iroh/src/magicsock/node_map/path_validity.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ pub(super) enum Source {
2828
Udp,
2929
}
3030

31+
#[derive(Debug, Clone, Copy)]
32+
pub enum ClearReason {
33+
Reset,
34+
Inactive,
35+
PongTimeout,
36+
MatchesOurLocalAddr,
37+
}
38+
3139
impl Source {
3240
fn trust_duration(&self) -> Duration {
3341
match self {

0 commit comments

Comments
 (0)