Skip to content

Commit 5982124

Browse files
committed
minors
1 parent 4153012 commit 5982124

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

circuits/tags-managing.circom

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ template MaxValueCheck(ct) {
135135
signal {maxbit} aux[2];
136136
aux.maxbit = nbits(ct);
137137
aux[0] <== MaxbitCheck(nbits(ct))(in); // to ensure the correct size
138-
aux[1] <== n;
138+
aux[1] <== ct;
139139

140140
signal out1 <== LessEqThan(nbits(ct))(aux);
141141
out1 === 1;
142-
out.maxvalue = n;
142+
out.maxvalue = ct;
143143
out <== in;
144144
}
145145

@@ -181,17 +181,17 @@ template MinMaxValueCheck(ct1,ct2){
181181
aux_min.maxbit = nbits(ct2);
182182
aux_min[0] <== ct1;
183183
aux_min[1] <== checked_in;
184-
signal out1 <== LessEqThan(nbits(n))(aux_min);
184+
signal out1 <== LessEqThan(nbits(ct1))(aux_min);
185185
out1 === 1;
186-
out.minvalue = n;
186+
out.minvalue = ct1;
187187

188188
signal {maxbit} aux_max[2];
189-
aux.maxbit = nbits(ct2);
189+
aux_max.maxbit = nbits(ct2);
190190
aux_max[0] <== checked_in;
191191
aux_max[1] <== ct2;
192-
signal out2 <== LessEqThan(nbits(n))(aux_max);
192+
signal out2 <== LessEqThan(nbits(ct2))(aux_max);
193193
out2 === 1;
194-
out.maxvalue = n;
194+
out.maxvalue = ct2;
195195

196196
out <== in;
197197
}

0 commit comments

Comments
 (0)