diff --git a/nym-node-status-api/nym-node-status-api/src/http/models.rs b/nym-node-status-api/nym-node-status-api/src/http/models.rs index da062fdbc2..5e53e3706a 100644 --- a/nym-node-status-api/nym-node-status-api/src/http/models.rs +++ b/nym-node-status-api/nym-node-status-api/src/http/models.rs @@ -395,13 +395,16 @@ fn calculate_score(gateway: &Gateway, probe_outcome: &LastProbeResult) -> ScoreV .map(|p| { let ping_ips_performance = p.ping_ips_performance_v4 as f64; - let duration = p.download_duration_sec_v4 as f64; + let duration_sec = + p.download_duration_milliseconds_v4 + .unwrap_or_else(|| p.download_duration_sec_v4 * 1000) as f64 + / 1000f64; // get the file size downloaded in bytes and convert to MB, or default to 1MB let file_size_mb = p.downloaded_file_size_bytes_v4.unwrap_or_else(|| 1048576) as f64 / 1024f64 / 1024f64; - let speed_mbps = file_size_mb / duration; + let speed_mbps = file_size_mb / duration_sec; let file_download_score = if speed_mbps > 100.0 { 1.0