@@ -317,15 +317,16 @@ abstract contract Pyth is
317317 return merkleData.numUpdates;
318318 }
319319
320- function parsePriceFeedUpdatesInternal (
320+ function parsePriceFeedUpdatesWithConfig (
321321 bytes [] calldata updateData ,
322322 bytes32 [] calldata priceIds ,
323323 uint64 minAllowedPublishTime ,
324324 uint64 maxAllowedPublishTime ,
325325 bool checkUniqueness ,
326- bool checkUpdateDataIsMinimal
326+ bool checkUpdateDataIsMinimal ,
327+ bool storeUpdatesIfFresh
327328 )
328- internal
329+ public
329330 returns (
330331 PythStructs.PriceFeed[] memory priceFeeds ,
331332 uint64 [] memory slots
@@ -389,13 +390,14 @@ abstract contract Pyth is
389390 override
390391 returns (PythStructs.PriceFeed[] memory priceFeeds )
391392 {
392- (priceFeeds, ) = parsePriceFeedUpdatesInternal (
393+ (priceFeeds, ) = parsePriceFeedUpdatesWithConfig (
393394 updateData,
394395 priceIds,
395396 minPublishTime,
396397 maxPublishTime,
397398 false ,
398- false
399+ false ,
400+ true // TODO: Figure out when to use the flag
399401 );
400402 }
401403
@@ -414,13 +416,14 @@ abstract contract Pyth is
414416 )
415417 {
416418 return
417- parsePriceFeedUpdatesInternal (
419+ parsePriceFeedUpdatesWithConfig (
418420 updateData,
419421 priceIds,
420422 minPublishTime,
421423 maxPublishTime,
422424 false ,
423- true
425+ true ,
426+ true // TODO: Figure out when to use the flag
424427 );
425428 }
426429
@@ -624,13 +627,14 @@ abstract contract Pyth is
624627 override
625628 returns (PythStructs.PriceFeed[] memory priceFeeds )
626629 {
627- (priceFeeds, ) = parsePriceFeedUpdatesInternal (
630+ (priceFeeds, ) = parsePriceFeedUpdatesWithConfig (
628631 updateData,
629632 priceIds,
630633 minPublishTime,
631634 maxPublishTime,
632635 true ,
633- false
636+ false ,
637+ true // TODO: Figure out when to use flag
634638 );
635639 }
636640
0 commit comments