Skip to content

Commit

Permalink
skip serializing on None
Browse files Browse the repository at this point in the history
  • Loading branch information
williampsmith committed Oct 2, 2024
1 parent 984c2b7 commit 6240e53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/sui-bridge-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ async fn main() -> anyhow::Result<()> {
let name = names.get(&sui_address).unwrap();
if ping {
let client_clone = client.clone();
ping_tasks.push(fetch_with_latency(client_clone, url.clone()));
ping_tasks.push(get_with_latency(client_clone, url.clone()));
}
authorities.push((
name,
Expand Down Expand Up @@ -589,6 +589,7 @@ struct OutputMember {
blocklisted: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
status: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
latency_ms: Option<u64>,
}

Expand All @@ -598,7 +599,7 @@ struct OutputSuiBridgeRegistration {
committee: Vec<OutputMember>,
}

async fn fetch_with_latency(
async fn get_with_latency(
client: Client,
url: String,
) -> (Result<reqwest::Response, reqwest::Error>, Duration) {
Expand Down

0 comments on commit 6240e53

Please sign in to comment.