@@ -300,30 +300,32 @@ impl PythReceiver {
300
300
301
301
pub fn parse_price_feed_updates_with_config (
302
302
& mut self ,
303
- update_data : Vec < u8 > ,
303
+ update_data : Vec < Vec < u8 > > ,
304
304
price_ids : Vec < [ u8 ; 32 ] > ,
305
305
min_allowed_publish_time : u64 ,
306
306
max_allowed_publish_time : u64 ,
307
307
check_uniqueness : bool ,
308
308
check_update_data_is_minimal : bool ,
309
309
store_updates_if_fresh : bool ,
310
310
) -> Result < Vec < PriceInfoReturn > , PythReceiverError > {
311
- let price_pairs;
312
- if store_updates_if_fresh {
313
- price_pairs = self . update_price_feeds_internal (
314
- update_data,
315
- price_ids. clone ( ) ,
316
- min_allowed_publish_time,
317
- max_allowed_publish_time,
318
- check_uniqueness,
319
- ) ?;
320
- } else {
321
- price_pairs = self . parse_price_feed_updates_internal (
322
- update_data,
323
- min_allowed_publish_time,
324
- max_allowed_publish_time,
325
- check_uniqueness,
326
- ) ?;
311
+ let all_parsed_price_pairs = Vec :: new ( ) ;
312
+ for data in & update_data {
313
+ if store_updates_if_fresh {
314
+ all_parsed_price_pairs. extend ( self . update_price_feeds_internal (
315
+ data,
316
+ price_ids. clone ( ) ,
317
+ min_allowed_publish_time,
318
+ max_allowed_publish_time,
319
+ check_uniqueness,
320
+ ) ?) ;
321
+ } else {
322
+ all_parsed_price_pairs. extend ( self . parse_price_feed_updates_internal (
323
+ data,
324
+ min_allowed_publish_time,
325
+ max_allowed_publish_time,
326
+ check_uniqueness,
327
+ ) ?) ;
328
+ }
327
329
}
328
330
329
331
if check_update_data_is_minimal && price_ids. len ( ) != price_pairs. len ( ) {
0 commit comments