File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,11 @@ where
210
210
}
211
211
212
212
// Sanity check
213
- assert_eq ! ( round1_public_packages. len( ) , round1_frost_packages. len( ) ) ;
213
+ if round1_public_packages. len ( ) != round1_frost_packages. len ( ) {
214
+ return Err ( IronfishFrostError :: InvalidInput (
215
+ "incorrect number of round 1 packages provided" . to_string ( ) ,
216
+ ) ) ;
217
+ }
214
218
215
219
// The public package for `identity` must be excluded from `frost::keys::dkg::part3`
216
220
// inputs
@@ -264,7 +268,11 @@ where
264
268
}
265
269
}
266
270
267
- assert_eq ! ( round2_public_packages. len( ) , round2_frost_packages. len( ) ) ;
271
+ if round2_public_packages. len ( ) != round2_frost_packages. len ( ) {
272
+ return Err ( IronfishFrostError :: InvalidInput (
273
+ "incorrect number of round 2 packages provided" . to_string ( ) ,
274
+ ) ) ;
275
+ }
268
276
269
277
let ( key_package, public_key_package) = part3 (
270
278
& round2_secret_package,
You can’t perform that action at this time.
0 commit comments