Skip to content

Commit

Permalink
Update packages/ciphernode/enclave/src/main.rs
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
ryardley and coderabbitai[bot] authored Oct 4, 2024
1 parent e858cdf commit 79de7fe
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/ciphernode/enclave/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
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);
Expand Down

0 comments on commit 79de7fe

Please sign in to comment.