@@ -463,8 +463,8 @@ pub async fn publish_batches<S>(
463463 network_state_rx : & watch:: Receiver < NetworkState > ,
464464 accumulator_key : Option < Pubkey > ,
465465 publish_keypair : & Keypair ,
466- oracle_program_key : Pubkey ,
467- publish_program_key : Option < Pubkey > ,
466+ pyth_oracle_program_key : Pubkey ,
467+ pyth_price_store_program_key : Option < Pubkey > ,
468468 publisher_buffer_key : Option < Pubkey > ,
469469 max_batch_size : usize ,
470470 staleness_threshold : Duration ,
@@ -502,8 +502,8 @@ where
502502 network_state,
503503 accumulator_key,
504504 publish_keypair,
505- oracle_program_key ,
506- publish_program_key ,
505+ pyth_oracle_program_key ,
506+ pyth_price_store_program_key ,
507507 publisher_buffer_key,
508508 batch,
509509 staleness_threshold,
@@ -547,8 +547,8 @@ async fn publish_batch<S>(
547547 network_state : NetworkState ,
548548 accumulator_key : Option < Pubkey > ,
549549 publish_keypair : & Keypair ,
550- oracle_program_key : Pubkey ,
551- publish_program_key : Option < Pubkey > ,
550+ pyth_oracle_program_key : Pubkey ,
551+ pyth_price_store_program_key : Option < Pubkey > ,
552552 publisher_buffer_key : Option < Pubkey > ,
553553 batch : & [ PermissionedUpdate ] ,
554554 staleness_threshold : Duration ,
@@ -592,12 +592,11 @@ where
592592 updates. push ( update) ;
593593 }
594594
595- if let Some ( publish_program_key ) = publish_program_key {
596- let instruction = create_instruction_with_publish_program (
595+ if let Some ( pyth_price_store_program_key ) = pyth_price_store_program_key {
596+ let instruction = create_instruction_with_price_store_program (
597597 publish_keypair. pubkey ( ) ,
598- publish_program_key,
599- publisher_buffer_key
600- . context ( "must specify publisher_buffer_key if publish_program_key is specified" ) ?,
598+ pyth_price_store_program_key,
599+ publisher_buffer_key. context ( "failed to fetch publisher buffer key" ) ?,
601600 updates,
602601 ) ?;
603602 instructions. push ( instruction) ;
@@ -606,7 +605,7 @@ where
606605 let instruction = if let Some ( accumulator_program_key) = accumulator_key {
607606 create_instruction_with_accumulator (
608607 publish_keypair. pubkey ( ) ,
609- oracle_program_key ,
608+ pyth_oracle_program_key ,
610609 Pubkey :: from ( update. feed_id . to_bytes ( ) ) ,
611610 & update. info ,
612611 network_state. current_slot ,
@@ -615,7 +614,7 @@ where
615614 } else {
616615 create_instruction_without_accumulator (
617616 publish_keypair. pubkey ( ) ,
618- oracle_program_key ,
617+ pyth_oracle_program_key ,
619618 Pubkey :: from ( update. feed_id . to_bytes ( ) ) ,
620619 & update. info ,
621620 network_state. current_slot ,
@@ -775,13 +774,13 @@ where
775774
776775fn create_instruction_without_accumulator (
777776 publish_pubkey : Pubkey ,
778- oracle_program_key : Pubkey ,
777+ pyth_oracle_program_key : Pubkey ,
779778 price_id : Pubkey ,
780779 price_info : & PriceInfo ,
781780 current_slot : u64 ,
782781) -> Result < Instruction > {
783782 Ok ( Instruction {
784- program_id : oracle_program_key ,
783+ program_id : pyth_oracle_program_key ,
785784 accounts : vec ! [
786785 AccountMeta {
787786 pubkey: publish_pubkey,
@@ -816,9 +815,9 @@ fn create_instruction_without_accumulator(
816815 } )
817816}
818817
819- fn create_instruction_with_publish_program (
818+ fn create_instruction_with_price_store_program (
820819 publish_pubkey : Pubkey ,
821- publish_program_key : Pubkey ,
820+ pyth_price_store_program_key : Pubkey ,
822821 publisher_buffer_key : Pubkey ,
823822 prices : Vec < PermissionedUpdate > ,
824823) -> Result < Instruction > {
@@ -829,7 +828,7 @@ fn create_instruction_with_publish_program(
829828 } ;
830829 let ( publisher_config_key, publisher_config_bump) = Pubkey :: find_program_address (
831830 & [ PUBLISHER_CONFIG_SEED . as_bytes ( ) , & publish_pubkey. to_bytes ( ) ] ,
832- & publish_program_key ,
831+ & pyth_price_store_program_key ,
833832 ) ;
834833
835834 let mut values = Vec :: new ( ) ;
@@ -851,7 +850,7 @@ fn create_instruction_with_publish_program(
851850 data. extend ( cast_slice ( & values) ) ;
852851
853852 let instruction = Instruction {
854- program_id : publish_program_key ,
853+ program_id : pyth_price_store_program_key ,
855854 accounts : vec ! [
856855 AccountMeta {
857856 pubkey: publish_pubkey,
@@ -876,7 +875,7 @@ fn create_instruction_with_publish_program(
876875
877876fn create_instruction_with_accumulator (
878877 publish_pubkey : Pubkey ,
879- oracle_program_key : Pubkey ,
878+ pyth_oracle_program_key : Pubkey ,
880879 price_id : Pubkey ,
881880 price_info : & PriceInfo ,
882881 current_slot : u64 ,
@@ -889,7 +888,7 @@ fn create_instruction_with_accumulator(
889888
890889 let ( oracle_auth_pda, _) = Pubkey :: find_program_address (
891890 & [ b"upd_price_write" , & accumulator_program_key. to_bytes ( ) ] ,
892- & oracle_program_key ,
891+ & pyth_oracle_program_key ,
893892 ) ;
894893
895894 let ( accumulator_data_pubkey, _accumulator_data_pubkey) = Pubkey :: find_program_address (
@@ -902,7 +901,7 @@ fn create_instruction_with_accumulator(
902901 ) ;
903902
904903 Ok ( Instruction {
905- program_id : oracle_program_key ,
904+ program_id : pyth_oracle_program_key ,
906905 accounts : vec ! [
907906 AccountMeta {
908907 pubkey: publish_pubkey,
0 commit comments