Skip to content

Commit

Permalink
Improve error message in constraint_circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sword-Smith committed Nov 12, 2022
1 parent 7cd9628 commit 08757bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion triton-vm/src/table/constraint_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ impl<T: TableChallenges> ConstraintCircuit<T> {
/// Verify that all IDs in the subtree are unique. Panics otherwise.
fn inner_has_unique_ids(&mut self, ids: &mut HashSet<usize>) {
let new_value = ids.insert(self.id.0);
assert!(!self.visited_counter.is_zero() || new_value);
assert!(
!self.visited_counter.is_zero() || new_value,
"ID = {} was repeated",
self.id
);
self.visited_counter += 1;
match &self.expression {
CircuitExpression::XConstant(_) => (),
Expand Down

0 comments on commit 08757bf

Please sign in to comment.