diff --git a/ecc/primitives/src/field_expression/field_variable.rs b/ecc/primitives/src/field_expression/field_variable.rs index 787d62f8c6..8b84925dab 100644 --- a/ecc/primitives/src/field_expression/field_variable.rs +++ b/ecc/primitives/src/field_expression/field_variable.rs @@ -246,6 +246,7 @@ impl FieldVariable { limb_max_abs: left_limb_max_abs, max_overflow_bits: left_max_overflow_bits, expr_limbs: left_expr_limbs, + range_checker_bits: a.range_checker_bits, _marker: PhantomData, } } diff --git a/ecc/primitives/src/field_expression/tests.rs b/ecc/primitives/src/field_expression/tests.rs index 3057c6e1c6..64f3fa8076 100644 --- a/ecc/primitives/src/field_expression/tests.rs +++ b/ecc/primitives/src/field_expression/tests.rs @@ -382,10 +382,8 @@ fn test_ec_double() { #[test] fn test_select() { let prime = secp256k1_coord_prime(); - let (subair, range_checker) = get_sub_air(&prime); + let (subair, range_checker, builder) = setup(&prime); - let builder = ExprBuilder::new(prime.clone(), LIMB_BITS, 32); - let builder = Rc::new(RefCell::new(builder)); let x1 = ExprBuilder::new_input::(builder.clone()); let x2 = ExprBuilder::new_input::(builder.clone()); let x3 = x1.clone() + x2.clone(); @@ -429,10 +427,7 @@ fn test_select() { #[test] fn test_select2() { let prime = secp256k1_coord_prime(); - let (subair, range_checker) = get_sub_air(&prime); - - let builder = ExprBuilder::new(prime.clone(), LIMB_BITS, 32); - let builder = Rc::new(RefCell::new(builder)); + let (subair, range_checker, builder) = setup(&prime); let x1 = ExprBuilder::new_input::(builder.clone()); let x2 = ExprBuilder::new_input::(builder.clone()); let x3 = x1.clone() + x2.clone();