From 446d7d5f111330bf915f9d5bf4e96ff4cf7aa857 Mon Sep 17 00:00:00 2001 From: Bridgerz Date: Thu, 17 Oct 2024 21:57:20 +0100 Subject: [PATCH] Fix ViewSuiBridge Bridge CLI command (#19869) ## Description Handle the case where a bridge committee member is no longer a validator. ## Test plan Tested locally. --- crates/sui-bridge-cli/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/sui-bridge-cli/src/main.rs b/crates/sui-bridge-cli/src/main.rs index 0919dfe6838e8..25532f6bc5335 100644 --- a/crates/sui-bridge-cli/src/main.rs +++ b/crates/sui-bridge-cli/src/main.rs @@ -411,7 +411,8 @@ async fn main() -> anyhow::Result<()> { }; let url = url.to_string(); - let name = names.get(&sui_address).unwrap(); + let name = names.get(&sui_address).cloned().unwrap_or(url.clone()); + if ping { let client_clone = client.clone(); ping_tasks.push(client_clone.get(url.clone()).send());