diff --git a/src/gates/exponentiation.rs b/src/gates/exponentiation.rs index ae0f5d49..b7d699f6 100644 --- a/src/gates/exponentiation.rs +++ b/src/gates/exponentiation.rs @@ -22,9 +22,10 @@ pub(crate) struct ExponentiationGate, const D: usize> { } impl, const D: usize> ExponentiationGate { - pub fn new(power_bits: usize) -> Self { + pub fn new(num_power_bits: usize) -> Self { + debug_assert!(num_power_bits < MAX_POWER_BITS); Self { - num_power_bits: power_bits, + num_power_bits, _phantom: PhantomData, } }