Skip to content

Commit aebbc72

Browse files
authored
bugfix: Use staging relay in n0_dns_pkarr_relay (#3335)
## Description Fixes #3334 ## Breaking Changes None ## Notes & open questions None
1 parent d915bfd commit aebbc72

File tree

1 file changed

+7
-2
lines changed
  • iroh/src/discovery/pkarr

1 file changed

+7
-2
lines changed

iroh/src/discovery/pkarr/dht.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use url::Url;
1919

2020
use crate::{
2121
discovery::{
22-
pkarr::{DEFAULT_PKARR_TTL, N0_DNS_PKARR_RELAY_PROD},
22+
pkarr::{DEFAULT_PKARR_TTL, N0_DNS_PKARR_RELAY_PROD, N0_DNS_PKARR_RELAY_STAGING},
2323
Discovery, DiscoveryError, DiscoveryItem, NodeData,
2424
},
2525
node_info::NodeInfo,
@@ -171,7 +171,12 @@ impl Builder {
171171
///
172172
/// [number 0]: https://n0.computer
173173
pub fn n0_dns_pkarr_relay(mut self) -> Self {
174-
self.pkarr_relay = Some(N0_DNS_PKARR_RELAY_PROD.parse().expect("valid URL"));
174+
let url = if crate::endpoint::force_staging_infra() {
175+
N0_DNS_PKARR_RELAY_STAGING
176+
} else {
177+
N0_DNS_PKARR_RELAY_PROD
178+
};
179+
self.pkarr_relay = Some(url.parse().expect("valid URL"));
175180
self
176181
}
177182

0 commit comments

Comments
 (0)