diff --git a/operator/src/network/ipfs_rpc.rs b/operator/src/network/ipfs_rpc.rs index 837fa825..baa18027 100644 --- a/operator/src/network/ipfs_rpc.rs +++ b/operator/src/network/ipfs_rpc.rs @@ -55,7 +55,7 @@ impl IpfsRpcClient for HttpRpcClient { let p2p_addrs = data .addresses .iter() - .map(|addr| -> Multiaddr { addr.parse().expect("should be a valid multiaddr") }) + .filter_map(|addr| addr.parse::().ok()) .filter(|addr| { // Address must have both a non loopback ip4 address and a tcp or quic endpoint addr.iter().any(|proto| match proto {