add non-zero assert in field batch_invert

This commit is contained in:
root 2019-08-01 15:02:15 +08:00
parent a659b92305
commit 2a46cd3b20

View file

@ -154,6 +154,9 @@ impl FieldElement {
acc = &acc * input;
}
// acc is nonzero iff all inputs are nonzero
assert_eq!(acc.is_zero().unwrap_u8(), 0);
// Compute the inverse of all products
acc = acc.invert();