@@ -32,7 +32,7 @@ mod del_product;
3232mod del_publisher;
3333mod init_mapping;
3434mod init_price;
35- mod init_price_feed_index ;
35+ mod resize_mapping ;
3636mod set_max_latency;
3737mod set_min_pub;
3838mod upd_permissions;
@@ -44,6 +44,11 @@ pub use add_publisher::{
4444 DISABLE_ACCUMULATOR_V2 ,
4545 ENABLE_ACCUMULATOR_V2 ,
4646} ;
47+ use solana_program:: {
48+ program_error:: ProgramError ,
49+ rent:: Rent ,
50+ sysvar:: Sysvar ,
51+ } ;
4752pub use {
4853 add_price:: add_price,
4954 add_product:: add_product,
@@ -53,6 +58,7 @@ pub use {
5358 del_publisher:: del_publisher,
5459 init_mapping:: init_mapping,
5560 init_price:: init_price,
61+ resize_mapping:: resize_mapping,
5662 set_max_latency:: set_max_latency,
5763 set_min_pub:: set_min_pub,
5864 upd_permissions:: upd_permissions,
@@ -65,14 +71,7 @@ pub use {
6571 } ,
6672 upd_product:: upd_product,
6773} ;
68- use {
69- init_price_feed_index:: init_price_feed_index,
70- solana_program:: {
71- program_error:: ProgramError ,
72- rent:: Rent ,
73- sysvar:: Sysvar ,
74- } ,
75- } ;
74+
7675
7776/// Dispatch to the right instruction in the oracle.
7877pub fn process_instruction (
@@ -105,7 +104,13 @@ pub fn process_instruction(
105104 DelProduct => del_product ( program_id, accounts, instruction_data) ,
106105 UpdPermissions => upd_permissions ( program_id, accounts, instruction_data) ,
107106 SetMaxLatency => set_max_latency ( program_id, accounts, instruction_data) ,
108- InitPriceFeedIndex => init_price_feed_index ( program_id, accounts, instruction_data) ,
107+ InitPriceFeedIndex => {
108+ solana_program:: msg!(
109+ "Oracle init price feed index instruction has been removed. Bailing out!"
110+ ) ;
111+ Err ( OracleError :: UnrecognizedInstruction . into ( ) )
112+ }
113+ ResizeMapping => resize_mapping ( program_id, accounts, instruction_data) ,
109114 }
110115}
111116
0 commit comments