Skip to content

Commit

Permalink
Remove expect
Browse files Browse the repository at this point in the history
  • Loading branch information
ryardley committed Nov 25, 2024
1 parent 4dea5cf commit 9ed6098
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ciphernode/enclave_node/src/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion packages/ciphernode/net/src/network_relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl NetworkRelay {
pub fn setup_with_peer(
bus: Addr<EventBus>,
peers: Vec<String>,
) -> Result<(Addr<Self>, tokio::task::JoinHandle<Result<()>>, String), Box<dyn Error>> {
) -> Result<(Addr<Self>, tokio::task::JoinHandle<Result<()>>, 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"))?;
Expand Down

0 comments on commit 9ed6098

Please sign in to comment.