Properly handles allocation errors
This commit is contained in:
parent
5e26ad1cc2
commit
4eb35aaee6
@ -1444,13 +1444,13 @@ impl<'a, E: Engine> Circuit<E> for CircomCircuit<'a> {
|
||||
cs.alloc_input(|| format!("variable {}", i), || {
|
||||
//println!("variable {}: {}", i, &self.witness[i]);
|
||||
Ok(E::Fr::from_str("1").unwrap())
|
||||
});
|
||||
})?;
|
||||
} else {
|
||||
//println!("allocating private input {}", i);
|
||||
cs.alloc(|| format!("variable {}", i), || {
|
||||
//println!("variable {}: {}", i, &self.witness[i]);
|
||||
Ok(E::Fr::from_str("1").unwrap())
|
||||
});
|
||||
})?;
|
||||
}
|
||||
}
|
||||
let mut constrained: BTreeMap<usize, bool> = BTreeMap::new();
|
||||
@ -1492,4 +1492,4 @@ impl<'a, E: Engine> Circuit<E> for CircomCircuit<'a> {
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user