Use map_err() when handling multiopen::Proof::create()

Co-authored-by: Daira Hopwood <daira@electriccoin.co>
This commit is contained in:
therealyingtong 2020-10-08 12:15:46 +08:00
parent 5181ca56f1
commit 89fd6e4d44
1 changed files with 16 additions and 18 deletions

View File

@ -551,9 +551,10 @@ impl<C: CurveAffine> Proof<C> {
}
}
if let Ok(multiopening) =
let multiopening =
multiopen::Proof::create(params, &mut transcript, &mut transcript_scalar, instances)
{
.map_err(|_| Error::OpeningError)?;
Ok(Proof {
advice_commitments,
h_commitments,
@ -567,8 +568,5 @@ impl<C: CurveAffine> Proof<C> {
h_evals,
multiopening,
})
} else {
Err(Error::OpeningError)
}
}
}