@@ -324,7 +324,8 @@ mod test {
324
324
#[ test]
325
325
fn test_vrf_performance_small ( ) {
326
326
let start = redux:: Instant :: now ( ) ;
327
- for i in 1 ..10 { // Much smaller than 14,403
327
+ for i in 1 ..10 {
328
+ // Much smaller than 14,403
328
329
let vrf_input = VrfEvaluationInput {
329
330
producer_key : keypair_from_bs58_string (
330
331
"EKEEpMELfQkMbJDt2fB4cFXKwSf1x4t7YD4twREy5yuJ84HBZtF9" ,
@@ -343,19 +344,27 @@ mod test {
343
344
} ;
344
345
let result = evaluate_vrf ( vrf_input) . expect ( "Failed to evaluate VRF" ) ;
345
346
// Ensure we get a valid result
346
- assert ! ( matches!( result, VrfEvaluationOutput :: SlotWon ( _) | VrfEvaluationOutput :: SlotLost ( _) ) ) ;
347
+ assert ! ( matches!(
348
+ result,
349
+ VrfEvaluationOutput :: SlotWon ( _) | VrfEvaluationOutput :: SlotLost ( _)
350
+ ) ) ;
347
351
}
348
352
let elapsed = start. elapsed ( ) ;
349
353
// Ensure the small test completes in reasonable time (under 10 seconds)
350
- assert ! ( elapsed. as_secs( ) < 10 , "VRF evaluation took too long: {}s" , elapsed. as_secs( ) ) ;
354
+ assert ! (
355
+ elapsed. as_secs( ) < 10 ,
356
+ "VRF evaluation took too long: {}s" ,
357
+ elapsed. as_secs( )
358
+ ) ;
351
359
}
352
360
353
361
/// Test VRF slot discovery with a smaller dataset suitable for CI.
354
362
/// This runs a reduced version of the winning slot test to ensure basic functionality
355
363
/// without taking too long in CI.
356
364
#[ test]
357
365
fn test_vrf_slot_discovery_small ( ) {
358
- for i in 0 ..100 { // Much smaller than 7,000
366
+ for i in 0 ..100 {
367
+ // Much smaller than 7,000
359
368
let vrf_input = VrfEvaluationInput {
360
369
producer_key : keypair_from_bs58_string (
361
370
"EKEEpMELfQkMbJDt2fB4cFXKwSf1x4t7YD4twREy5yuJ84HBZtF9" ,
@@ -375,7 +384,10 @@ mod test {
375
384
let evaluation_result =
376
385
evaluate_vrf ( vrf_input. clone ( ) ) . expect ( "Failed to evaluate vrf" ) ;
377
386
// Just ensure VRF evaluation works without errors for all slots
378
- assert ! ( matches!( evaluation_result, VrfEvaluationOutput :: SlotWon ( _) | VrfEvaluationOutput :: SlotLost ( _) ) ) ;
387
+ assert ! ( matches!(
388
+ evaluation_result,
389
+ VrfEvaluationOutput :: SlotWon ( _) | VrfEvaluationOutput :: SlotLost ( _)
390
+ ) ) ;
379
391
}
380
392
}
381
393
}
0 commit comments