@@ -84,7 +84,7 @@ fn test_upd_price_v2() {
8484
8585 assert_eq ! ( price_data. price_cumulative. price, 0 ) ;
8686 assert_eq ! ( price_data. price_cumulative. conf, 0 ) ;
87- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
87+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
8888 }
8989
9090 // add some prices for current slot - get rejected
@@ -117,7 +117,7 @@ fn test_upd_price_v2() {
117117
118118 assert_eq ! ( price_data. price_cumulative. price, 0 ) ;
119119 assert_eq ! ( price_data. price_cumulative. conf, 0 ) ;
120- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
120+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
121121 }
122122
123123 // add next price in new slot triggering snapshot and aggregate calc
@@ -149,7 +149,7 @@ fn test_upd_price_v2() {
149149
150150 assert_eq ! ( price_data. price_cumulative. price, 3 * 42 ) ;
151151 assert_eq ! ( price_data. price_cumulative. conf, 3 * 2 ) ;
152- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
152+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
153153 }
154154
155155 // next price doesnt change but slot does
@@ -180,7 +180,7 @@ fn test_upd_price_v2() {
180180
181181 assert_eq ! ( price_data. price_cumulative. price, 3 * 42 + 81 ) ;
182182 assert_eq ! ( price_data. price_cumulative. conf, 3 * 2 + 2 ) ;
183- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
183+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
184184 }
185185
186186 // next price doesnt change and neither does aggregate but slot does
@@ -211,7 +211,7 @@ fn test_upd_price_v2() {
211211
212212 assert_eq ! ( price_data. price_cumulative. price, 3 * 42 + 81 * 2 ) ;
213213 assert_eq ! ( price_data. price_cumulative. conf, 3 * 2 + 2 * 2 ) ;
214- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
214+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
215215 }
216216
217217 // try to publish back-in-time
@@ -244,7 +244,7 @@ fn test_upd_price_v2() {
244244
245245 assert_eq ! ( price_data. price_cumulative. price, 3 * 42 + 81 * 2 ) ;
246246 assert_eq ! ( price_data. price_cumulative. conf, 3 * 2 + 2 * 2 ) ;
247- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
247+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
248248 }
249249
250250 populate_instruction ( & mut instruction_data, 50 , 20 , 5 ) ;
@@ -283,7 +283,7 @@ fn test_upd_price_v2() {
283283
284284 assert_eq ! ( price_data. price_cumulative. price, 3 * 42 + 81 * 3 ) ;
285285 assert_eq ! ( price_data. price_cumulative. conf, 3 * 2 + 2 * 3 ) ;
286- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
286+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
287287 }
288288
289289 // Crank one more time and aggregate should be unknown
@@ -315,7 +315,7 @@ fn test_upd_price_v2() {
315315
316316 assert_eq ! ( price_data. price_cumulative. price, 3 * 42 + 81 * 3 ) ;
317317 assert_eq ! ( price_data. price_cumulative. conf, 3 * 2 + 2 * 3 ) ;
318- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
318+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
319319 }
320320
321321 // Negative prices are accepted
@@ -347,7 +347,7 @@ fn test_upd_price_v2() {
347347
348348 assert_eq ! ( price_data. price_cumulative. price, 3 * 42 + 81 * 3 ) ;
349349 assert_eq ! ( price_data. price_cumulative. conf, 3 * 2 + 2 * 3 ) ;
350- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
350+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
351351 }
352352
353353 // Crank again for aggregate
@@ -379,7 +379,7 @@ fn test_upd_price_v2() {
379379
380380 assert_eq ! ( price_data. price_cumulative. price, 3 * 42 + 81 * 3 - 100 * 3 ) ;
381381 assert_eq ! ( price_data. price_cumulative. conf, 3 * 2 + 2 * 3 + 3 ) ;
382- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
382+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
383383 }
384384
385385 // Big gap
@@ -412,15 +412,9 @@ fn test_upd_price_v2() {
412412
413413 assert_eq ! ( price_data. price_cumulative. price, 3 * 42 + 81 * 3 - 100 * 3 ) ;
414414 assert_eq ! ( price_data. price_cumulative. conf, 3 * 2 + 2 * 3 + 3 ) ;
415- assert_eq ! ( price_data. price_cumulative. num_gaps , 0 ) ;
415+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 0 ) ;
416416 }
417417
418- // Big gap
419-
420- populate_instruction ( & mut instruction_data, 60 , 4 , 50 ) ;
421- update_clock_slot ( & mut clock_account, 50 ) ;
422-
423-
424418 // Crank again for aggregate
425419
426420 populate_instruction ( & mut instruction_data, 55 , 5 , 51 ) ;
@@ -454,7 +448,7 @@ fn test_upd_price_v2() {
454448 3 * 42 + 81 * 3 - 100 * 3 + 42 * 60
455449 ) ;
456450 assert_eq ! ( price_data. price_cumulative. conf, 3 * 2 + 2 * 3 + 3 + 42 * 4 ) ;
457- assert_eq ! ( price_data. price_cumulative. num_gaps , 1 ) ;
451+ assert_eq ! ( price_data. price_cumulative. num_down_slots , 17 ) ;
458452 }
459453}
460454
0 commit comments