From 1be54d9f0dc9d33dee85a119ca5c013ce0c46e28 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 15 Dec 2021 15:42:05 +0000 Subject: [PATCH] Use `<= PrimeField::CAPACITY` instead of `< PrimeField::NUM_BITS` --- src/circuit/gadget/sinsemilla.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/circuit/gadget/sinsemilla.rs b/src/circuit/gadget/sinsemilla.rs index 4c653bb8..b3151ead 100644 --- a/src/circuit/gadget/sinsemilla.rs +++ b/src/circuit/gadget/sinsemilla.rs @@ -196,7 +196,7 @@ where let to_base_field = |bits: &[Option]| -> Option { // To simplify the following logic, require that the all-ones bitstring is // canonical in the field, by not allowing a length of NUM_BITS. - assert!(bits.len() < C::Base::NUM_BITS as usize); + assert!(bits.len() <= C::Base::CAPACITY as usize); let bits: Option> = bits.iter().cloned().collect(); bits.map(|bits| {