From f70d4047d87e10d015e573bca1745a2a561ac87e Mon Sep 17 00:00:00 2001 From: nemo Date: Tue, 3 Nov 2020 13:46:16 -0500 Subject: [PATCH] fix: print error instead of panic on failure --- storage-proofs/porep/src/stacked/vanilla/proof.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/storage-proofs/porep/src/stacked/vanilla/proof.rs b/storage-proofs/porep/src/stacked/vanilla/proof.rs index 04e3ab4e1..2f25ef8f3 100644 --- a/storage-proofs/porep/src/stacked/vanilla/proof.rs +++ b/storage-proofs/porep/src/stacked/vanilla/proof.rs @@ -997,8 +997,12 @@ impl<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> StackedDrg<'a, Tr LabelsCache::::new(&label_configs).context("failed to create labels cache")?; let configs = split_config(tree_c_config.clone(), tree_count)?; - let res = fdlimit::raise_fd_limit().expect("Failed to raise the fd limit"); - info!("Building trees [{} descriptors max available]", res); + match fdlimit::raise_fd_limit() { + Some(res) => { + info!("Building trees [{} descriptors max available]", res); + } + None => error!("Failed to raise the fd limit"), + }; let tree_c_root = match layers { 2 => {