@@ -86,60 +86,8 @@ mod tests {
86
86
87
87
use super :: * ;
88
88
89
- #[ test]
90
- #[ ignore]
91
- fn test_vrf ( ) {
92
- let json = std:: fs:: read_to_string ( "/tmp/vrf.json" ) . unwrap ( ) ;
93
- let vrf_evaluator_input: VrfEvaluatorInput = serde_json:: from_str ( & json) . unwrap ( ) ;
94
-
95
- let private = "SOME_KEY" ;
96
- let private = AccountSecretKey :: from_str ( private) . unwrap ( ) ;
97
- let keypair: Keypair = private. into ( ) ;
98
-
99
- let VrfEvaluatorInput {
100
- epoch_seed,
101
- delegator_table,
102
- global_slot,
103
- total_currency,
104
- staking_ledger_hash : _,
105
- } = & vrf_evaluator_input;
106
-
107
- let now = std:: time:: Instant :: now ( ) ;
108
-
109
- let vrf_result = delegator_table
110
- . iter ( )
111
- . map ( |( index, ( pub_key, stake) ) | {
112
- let vrf_input = VrfEvaluationInput {
113
- producer_key : keypair. clone ( ) ,
114
- global_slot : * global_slot,
115
- epoch_seed : epoch_seed. clone ( ) ,
116
- account_pub_key : pub_key. clone ( ) ,
117
- delegator_index : * index,
118
- delegated_stake : ( * stake) . into ( ) ,
119
- total_currency : ( * total_currency) . into ( ) ,
120
- } ;
121
- // let now = redux::Instant::now();
122
- let vrf_result = vrf:: evaluate_vrf ( vrf_input) . unwrap ( ) ;
123
- // let elapsed = now.elapsed();
124
- // let slot = global_slot;
125
- // eprintln!("vrf::evaluate_vrf: {elapsed:?} slot:{slot:?} index:{index:?}");
126
- // openmina_core::info!(openmina_core::log::system_time(); "vrf::evaluate_vrf: {elapsed:?} slot:{slot:?} index:{index:?}");
127
-
128
- // nevaluated.fetch_add(1, std::sync::atomic::Ordering::AcqRel);
129
-
130
- // the first delegate that won the slot
131
- if let VrfEvaluationOutput :: SlotWon ( _) = vrf_result {
132
- return Some ( vrf_result) ;
133
- }
134
- None
135
- } )
136
- . collect :: < Vec < _ > > ( ) ;
137
-
138
- let elapsed = now. elapsed ( ) ;
139
- let slot = vrf_evaluator_input. global_slot ;
140
- let ndelegator = vrf_evaluator_input. delegator_table . len ( ) ;
141
- // let nevaluated = nevaluated.load(std::sync::atomic::Ordering::Relaxed);
142
- eprintln ! ( "TOTAL vrf::evaluate_vrf: {elapsed:?} slot:{slot:?} ndelegators:{ndelegator:?}" ) ;
143
- dbg ! ( vrf_result) ;
144
- }
89
+ // Note: There was a test here that depended on external file /tmp/vrf.json
90
+ // which was more of a development debugging tool than a real unit test.
91
+ // It has been removed. If you need to test VRF evaluation, use the tests
92
+ // in the vrf crate instead.
145
93
}
0 commit comments