diff --git a/packages/ciphernode/enclave_node/src/aggregator.rs b/packages/ciphernode/enclave_node/src/aggregator.rs index a6bec53b..c0e36154 100644 --- a/packages/ciphernode/enclave_node/src/aggregator.rs +++ b/packages/ciphernode/enclave_node/src/aggregator.rs @@ -83,7 +83,7 @@ pub async fn setup_aggregator( .await?; let (_, join_handle, peer_id) = - NetworkRelay::setup_with_peer(bus.clone(), config.peers()).expect("Failed to setup libp2p"); + NetworkRelay::setup_with_peer(bus.clone(), config.peers())?; if let Some(path) = pubkey_write_path { PublicKeyWriter::attach(path, bus.clone()); diff --git a/packages/ciphernode/net/src/network_relay.rs b/packages/ciphernode/net/src/network_relay.rs index 3d4a6702..fe2b8add 100644 --- a/packages/ciphernode/net/src/network_relay.rs +++ b/packages/ciphernode/net/src/network_relay.rs @@ -66,7 +66,7 @@ impl NetworkRelay { pub fn setup_with_peer( bus: Addr, peers: Vec, - ) -> Result<(Addr, tokio::task::JoinHandle>, String), Box> { + ) -> Result<(Addr, tokio::task::JoinHandle>, String)> { let keypair = libp2p::identity::Keypair::generate_ed25519(); let mut peer = NetworkPeer::new(&keypair, peers, None, "tmp-enclave-gossip-topic")?; let rx = peer.rx().ok_or(anyhow!("Peer rx already taken"))?;