File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ impl<F: Field> ConstraintSystem<F> {
298298 }
299299 }
300300 self . num_constraints += 1 ;
301-
301+
302302 Ok ( ( ) )
303303 }
304304
@@ -541,11 +541,15 @@ impl<F: Field> ConstraintSystem<F> {
541541 /// Optimize the constraint system (either by outlining or inlining,
542542 /// if an optimization goal is set).
543543 pub fn optimize ( & mut self ) {
544- match self . optimization_goal {
545- OptimizationGoal :: None => self . inline_all_lcs ( ) ,
546- OptimizationGoal :: Constraints => self . inline_all_lcs ( ) ,
547- OptimizationGoal :: Weight => self . outline_lcs ( ) ,
548- } ;
544+ // In verify mode we don't have any linear combinations; all variables
545+ // are instance variables, and there are no generated constraints
546+ if !self . is_in_verify_mode ( ) {
547+ match self . optimization_goal {
548+ OptimizationGoal :: None => self . inline_all_lcs ( ) ,
549+ OptimizationGoal :: Constraints => self . inline_all_lcs ( ) ,
550+ OptimizationGoal :: Weight => self . outline_lcs ( ) ,
551+ } ;
552+ }
549553 }
550554
551555 /// This step must be called after constraint generation has completed, and
You can’t perform that action at this time.
0 commit comments