mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-02 19:55:56 +01:00
return error in construct_proofs if arguments are not the same length
This commit is contained in:
committed by
thesimplekid
parent
ceac5b64d7
commit
5dca9af70f
@@ -102,6 +102,11 @@ pub fn construct_proofs(
|
||||
secrets: Vec<Secret>,
|
||||
keys: &Keys,
|
||||
) -> Result<Proofs, Error> {
|
||||
if (promises.len() != rs.len()) || (promises.len() != secrets.len()) {
|
||||
return Err(Error::CustomError(
|
||||
"Lengths of promises, rs, and secrets must be equal".to_string(),
|
||||
));
|
||||
}
|
||||
let mut proofs = vec![];
|
||||
for ((blinded_signature, r), secret) in promises.into_iter().zip(rs).zip(secrets) {
|
||||
let blinded_c: PublicKey = blinded_signature.c;
|
||||
|
||||
Reference in New Issue
Block a user