From 79de7fedf3b07f17628ceaa48c1a913cac51f9e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=B3=CE=BB?= Date: Fri, 4 Oct 2024 10:18:40 +1000 Subject: [PATCH] Update packages/ciphernode/enclave/src/main.rs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- packages/ciphernode/enclave/src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/ciphernode/enclave/src/main.rs b/packages/ciphernode/enclave/src/main.rs index 5b8fabe7..0fc0d84a 100644 --- a/packages/ciphernode/enclave/src/main.rs +++ b/packages/ciphernode/enclave/src/main.rs @@ -35,12 +35,15 @@ async fn main() -> Result<(), Box> { println!("\n\n\n\n\n{}", OWO); println!("\n\n\n\n"); let args = Args::parse(); - let address = Address::parse_checksummed(&args.address, None).expect("Invalid address"); + let address = Address::parse_checksummed(&args.address, None) + .map_err(|e| format!("Invalid node address: {}", e))?; println!("LAUNCHING CIPHERNODE: ({})", address); let registry_contract = - Address::parse_checksummed(&args.registry_contract, None).expect("Invalid address"); + Address::parse_checksummed(&args.registry_contract, None) + .map_err(|e| format!("Invalid registry contract address: {}", e))?; let enclave_contract = - Address::parse_checksummed(&args.enclave_contract, None).expect("Invalid address"); + Address::parse_checksummed(&args.enclave_contract, None) + .map_err(|e| format!("Invalid enclave contract address: {}", e))?; let (_, handle) = MainCiphernode::attach(address, &args.rpc, enclave_contract, registry_contract).await; let _ = tokio::join!(handle);