Skip to content

Commit

Permalink
fix: capacity is already bits - 1
Browse files Browse the repository at this point in the history
  • Loading branch information
shuklaayush committed Nov 26, 2023
1 parent 5cda44b commit d047fb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion halo2-base/src/gates/flex_gate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ impl<F: ScalarField> GateInstructions<F> for GateChip<F> {
/// Assumes values of `bits` are boolean.
/// * `bits`: slice of [QuantumCell]'s that contains bit representation in little-endian form
fn bits_to_num(&self, ctx: &mut Context<F>, bits: &[AssignedValue<F>]) -> AssignedValue<F> {
assert!((bits.len() as u32) < F::CAPACITY);
assert!((bits.len() as u32) <= F::CAPACITY);

self.inner_product(
ctx,
Expand Down

0 comments on commit d047fb7

Please sign in to comment.