@@ -256,7 +256,11 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
256256 numInitialFeeds
257257 );
258258
259- mockParsePriceFeedUpdatesWithSlots (pyth, initialPriceFeeds, slots);
259+ mockParsePriceFeedUpdatesWithSlotsStrict (
260+ pyth,
261+ initialPriceFeeds,
262+ slots
263+ );
260264 bytes [] memory updateData = createMockUpdateData (initialPriceFeeds);
261265
262266 vm.prank (pusher);
@@ -830,7 +834,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
830834 priceIds.length
831835 );
832836
833- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds1, slots);
837+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds1, slots);
834838 bytes [] memory updateData1 = createMockUpdateData (priceFeeds1);
835839
836840 // Perform first update
@@ -881,7 +885,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
881885 priceFeeds2[i].emaPrice.publishTime = publishTime2;
882886 }
883887
884- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds2, slots); // Mock for the second call
888+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds2, slots); // Mock for the second call
885889 bytes [] memory updateData2 = createMockUpdateData (priceFeeds2);
886890
887891 // Perform second update
@@ -942,7 +946,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
942946 );
943947
944948 uint256 mockPythFee = MOCK_PYTH_FEE_PER_FEED * params.priceIds.length ;
945- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
949+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds, slots);
946950 bytes [] memory updateData = createMockUpdateData (priceFeeds);
947951
948952 // Get state before
@@ -1027,7 +1031,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
10271031 priceIds.length
10281032 );
10291033 uint256 mockPythFee = MOCK_PYTH_FEE_PER_FEED * priceIds.length ;
1030- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
1034+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds, slots);
10311035 bytes [] memory updateData = createMockUpdateData (priceFeeds);
10321036
10331037 // Calculate minimum keeper fee (overhead + feed-specific fee)
@@ -1085,7 +1089,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
10851089 PythStructs.PriceFeed[] memory priceFeeds1;
10861090 uint64 [] memory slots1;
10871091 (priceFeeds1, slots1) = createMockPriceFeedsWithSlots (publishTime1, 2 );
1088- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds1, slots1);
1092+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds1, slots1);
10891093 bytes [] memory updateData1 = createMockUpdateData (priceFeeds1);
10901094 vm.prank (pusher);
10911095 scheduler.updatePriceFeeds (subscriptionId, updateData1);
@@ -1096,7 +1100,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
10961100 PythStructs.PriceFeed[] memory priceFeeds2;
10971101 uint64 [] memory slots2;
10981102 (priceFeeds2, slots2) = createMockPriceFeedsWithSlots (publishTime2, 2 );
1099- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds2, slots2);
1103+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds2, slots2);
11001104 bytes [] memory updateData2 = createMockUpdateData (priceFeeds2);
11011105
11021106 // Expect revert because heartbeat condition is not met
@@ -1132,7 +1136,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
11321136 PythStructs.PriceFeed[] memory priceFeeds1;
11331137 uint64 [] memory slots;
11341138 (priceFeeds1, slots) = createMockPriceFeedsWithSlots (publishTime1, 2 );
1135- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds1, slots);
1139+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds1, slots);
11361140 bytes [] memory updateData1 = createMockUpdateData (priceFeeds1);
11371141 vm.prank (pusher);
11381142 scheduler.updatePriceFeeds (subscriptionId, updateData1);
@@ -1158,7 +1162,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
11581162 priceFeeds2[i].price.publishTime = publishTime2;
11591163 }
11601164
1161- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds2, slots);
1165+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds2, slots);
11621166 bytes [] memory updateData2 = createMockUpdateData (priceFeeds2);
11631167
11641168 // Expect revert because deviation condition is not met
@@ -1183,7 +1187,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
11831187 PythStructs.PriceFeed[] memory priceFeeds1;
11841188 uint64 [] memory slots1;
11851189 (priceFeeds1, slots1) = createMockPriceFeedsWithSlots (publishTime1, 2 );
1186- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds1, slots1);
1190+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds1, slots1);
11871191 bytes [] memory updateData1 = createMockUpdateData (priceFeeds1);
11881192
11891193 vm.prank (pusher);
@@ -1195,7 +1199,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
11951199 uint64 [] memory slots2;
11961200 (priceFeeds2, slots2) = createMockPriceFeedsWithSlots (publishTime2, 2 );
11971201 // Mock Pyth response to return feeds with the older timestamp
1198- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds2, slots2);
1202+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds2, slots2);
11991203 bytes [] memory updateData2 = createMockUpdateData (priceFeeds2);
12001204
12011205 // Expect revert with TimestampOlderThanLastUpdate (checked in _validateShouldUpdatePrices)
@@ -1235,7 +1239,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
12351239 slots[1 ] = 200 ; // Different slot
12361240
12371241 // Mock Pyth response to return these feeds with mismatched slots
1238- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
1242+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds, slots);
12391243 bytes [] memory updateData = createMockUpdateData (priceFeeds);
12401244
12411245 // Expect revert with PriceSlotMismatch error
@@ -1350,7 +1354,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
13501354 PythStructs.PriceFeed[] memory priceFeeds_reduce ,
13511355 uint64 [] memory slots_reduce
13521356 ) = createMockPriceFeedsWithSlots (publishTime + (i * 60 ), 2 );
1353- mockParsePriceFeedUpdatesWithSlots (
1357+ mockParsePriceFeedUpdatesWithSlotsStrict (
13541358 pyth,
13551359 priceFeeds_reduce,
13561360 slots_reduce
@@ -1422,7 +1426,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
14221426 PythStructs.PriceFeed[] memory priceFeeds;
14231427 uint64 [] memory slots;
14241428 (priceFeeds, slots) = createMockPriceFeedsWithSlots (publishTime, 2 );
1425- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
1429+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds, slots);
14261430 bytes [] memory updateData = createMockUpdateData (priceFeeds);
14271431
14281432 vm.prank (pusher);
@@ -1464,7 +1468,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
14641468 PythStructs.PriceFeed[] memory priceFeeds;
14651469 uint64 [] memory slots;
14661470 (priceFeeds, slots) = createMockPriceFeedsWithSlots (publishTime, 3 );
1467- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
1471+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds, slots);
14681472 bytes [] memory updateData = createMockUpdateData (priceFeeds);
14691473
14701474 vm.prank (pusher);
@@ -1519,7 +1523,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
15191523 PythStructs.PriceFeed[] memory priceFeeds;
15201524 uint64 [] memory slots;
15211525 (priceFeeds, slots) = createMockPriceFeedsWithSlots (publishTime, 2 );
1522- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
1526+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds, slots);
15231527 bytes [] memory updateData = createMockUpdateData (priceFeeds);
15241528
15251529 vm.prank (pusher);
@@ -1563,7 +1567,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
15631567 publishTime,
15641568 priceIds.length
15651569 );
1566- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
1570+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds, slots);
15671571 bytes [] memory updateData = createMockUpdateData (priceFeeds);
15681572
15691573 vm.prank (pusher);
@@ -1630,7 +1634,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
16301634 priceFeeds[i].emaPrice.expo = priceFeeds[i].price.expo;
16311635 }
16321636
1633- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
1637+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds, slots);
16341638 bytes [] memory updateData = createMockUpdateData (priceFeeds);
16351639
16361640 vm.prank (pusher);
@@ -1935,7 +1939,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
19351939 slots[1 ] = 100 ; // Same slot
19361940
19371941 // Mock Pyth response (should succeed in the real world as minValidTime is 0)
1938- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
1942+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds, slots);
19391943 bytes [] memory updateData = createMockUpdateData (priceFeeds);
19401944
19411945 // Expect PricesUpdated event with the latest valid timestamp
@@ -1988,7 +1992,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
19881992 slots[1 ] = 100 ; // Same slot
19891993
19901994 // Mock Pyth response (should succeed in the real world as minValidTime is 0)
1991- mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
1995+ mockParsePriceFeedUpdatesWithSlotsStrict (pyth, priceFeeds, slots);
19921996 bytes [] memory updateData = createMockUpdateData (priceFeeds);
19931997
19941998 // Expect revert with TimestampTooOld (checked in _validateShouldUpdatePrices)
0 commit comments