Skip to content

Commit 62c51e3

Browse files
committed
docs
1 parent 07f0b3b commit 62c51e3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

iroh/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ pub use iroh_base::{
275275
KeyParsingError, NodeAddr, NodeId, PublicKey, RelayUrl, RelayUrlParseError, SecretKey,
276276
};
277277
pub use iroh_relay::{RelayMap, RelayNode, node_info};
278+
pub use magicsock::InterfacePriority;
278279
pub use n0_watcher::Watcher;
279280

280281
#[cfg(any(test, feature = "test-utils"))]

iroh/src/magicsock.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const HEARTBEAT_JITTER_PCT: f64 = 0.25;
106106
/// Create a jittered interval to prevent synchronized heartbeat storms.
107107
fn jittered_interval(base: Duration) -> time::Interval {
108108
let jitter_range = base.as_secs_f64() * HEARTBEAT_JITTER_PCT;
109-
let jitter = rand::thread_rng().gen_range(-jitter_range..=jitter_range);
109+
let jitter = rand::rng().random_range(-jitter_range..=jitter_range);
110110
let jittered = base.as_secs_f64() + jitter;
111111
let duration = Duration::from_secs_f64(jittered.max(0.1));
112112
time::interval(duration)
@@ -1423,7 +1423,7 @@ impl Handle {
14231423
let ipv6_reported = false;
14241424

14251425
// load the node data
1426-
let node_addrs = node_map.unwrap_or_default();
1426+
let node_addrs = Vec::new();
14271427

14281428
let my_relay = Watchable::new(None);
14291429
let ipv6_reported = Arc::new(AtomicBool::new(ipv6_reported));
@@ -2609,7 +2609,6 @@ mod tests {
26092609
addr_v6: None,
26102610
secret_key,
26112611
relay_map: RelayMap::empty(),
2612-
node_map: None,
26132612
discovery: Default::default(),
26142613
proxy_url: None,
26152614
dns_resolver: DnsResolver::new(),

iroh/src/magicsock/interface_priority.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use netwatch::netmon;
1515
/// # Examples
1616
///
1717
/// ```no_run
18-
/// use iroh::magicsock::InterfacePriority;
18+
/// use iroh::InterfacePriority;
1919
///
2020
/// // Prefer Infiniband (ib*) over Ethernet (eth*, en*)
2121
/// let priority = InterfacePriority::new(vec![

0 commit comments

Comments
 (0)