Skip to content

Commit

Permalink
Merge pull request #2342 from AleoHQ/remove_extraneous_set_constraint…
Browse files Browse the repository at this point in the history
…_limit

Remove extraneous set_constraint_limit and clarify why
  • Loading branch information
howardwu authored Feb 9, 2024
2 parents 24a4f2a + 6557971 commit dbe4c95
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions synthesizer/process/src/stack/call/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,6 @@ impl<N: Network> CallTrait<N> for Call<N> {
// Inject the existing circuit.
A::inject_r1cs(r1cs);

// If in 'CheckDeployment' mode, reset the constraint limit back to the parent circuit limit.
if let CallStack::CheckDeployment(_, _, _, constraint_limit) = &registers.call_stack() {
A::set_constraint_limit(*constraint_limit);
}

use circuit::Inject;

// Inject the network ID as `Mode::Constant`.
Expand Down
1 change: 1 addition & 0 deletions synthesizer/process/src/stack/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ impl<N: Network> StackExecute<N> for Stack<N> {
A::reset();

// If in 'CheckDeployment' mode, set the constraint limit.
// We do not have to reset it after function calls because `CheckDeployment` mode does not execute those.
if let CallStack::CheckDeployment(_, _, _, constraint_limit) = &call_stack {
A::set_constraint_limit(*constraint_limit);
}
Expand Down

0 comments on commit dbe4c95

Please sign in to comment.