address comments

This commit is contained in:
benedettadavico
2026-04-13 13:24:25 +02:00
parent 67a858f539
commit 0789f55bd7
4 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ anyhow = { workspace = true }
base64 = { workspace = true }
bs58 = { workspace = true }
bytes = { workspace = true }
clap = { workspace = true, features = ["cargo", "derive"] }
clap = { workspace = true, features = ["cargo", "derive", "env"] }
futures = { workspace = true }
hex = { workspace = true }
tracing = { workspace = true }
@@ -12,7 +12,6 @@ use tracing::{error, info};
use crate::NetstackArgs;
use crate::common::netstack::{NetstackRequest, NetstackRequestGo, NetstackResult};
use crate::common::types::WgProbeResults;
use crate::config::NetstackArgs;
/// Safe division that returns 0.0 when divisor is 0 (instead of NaN/Inf)
fn safe_ratio(received: u16, sent: u16) -> f32 {
+4 -1
View File
@@ -52,7 +52,7 @@ pub struct NetstackArgs {
pub port_check_ports: Vec<u16>,
/// Timeout in seconds for each individual port check attempt
#[arg(long, default_value_t = 5)]
#[arg(long, default_value_t = NetstackArgs::default().port_check_timeout_sec)]
pub port_check_timeout_sec: u64,
}
@@ -74,6 +74,9 @@ impl Default for NetstackArgs {
"2606:4700:4700::1111".to_string(),
"2620:fe::fe".to_string(),
],
port_check_target: "portquiz.net".to_string(),
port_check_ports: vec![],
port_check_timeout_sec: 5,
}
}
}
+4 -2
View File
@@ -230,7 +230,7 @@ pub(crate) async fn run() -> anyhow::Result<ProbeOutput> {
setup_env(args.config_env_file.as_ref());
let network = nym_sdk::NymNetworkDetails::new_from_env();
info!("{:#?}", network);
debug!("{:#?}", network);
match args.command {
Commands::RunLocal {
@@ -449,7 +449,9 @@ pub(crate) async fn run() -> anyhow::Result<ProbeOutput> {
let trial =
nym_gateway_probe::Probe::new_for_agent(entry_gateway, network, probe_config)
.await?;
Box::pin(trial.probe_run_agent(credential_args)).await
Box::pin(trial.probe_run_agent(credential_args))
.await
.map(ProbeOutput::Standard)
}
}
}