@@ -109,49 +109,49 @@ pub fn resize_price_account(
109109 accounts : & [ AccountInfo ] ,
110110 _instruction_data : & [ u8 ] ,
111111) -> ProgramResult {
112- let [ funding_account_info, price_account , system_program] = match accounts {
112+ let [ funding_account_info, price_account_info , system_program] = match accounts {
113113 [ x, y, z] => Ok ( [ x, y, z] ) ,
114114 _ => Err ( ProgramError :: InvalidArgument ) ,
115115 } ?;
116116
117117 check_valid_funding_account ( funding_account_info) ?;
118- check_valid_signable_account ( program_id, price_account , size_of :: < PriceAccount > ( ) ) ?;
118+ check_valid_signable_account ( program_id, price_account_info , size_of :: < PriceAccount > ( ) ) ?;
119119 pyth_assert (
120120 check_id ( system_program. key ) ,
121121 OracleError :: InvalidSystemAccount . into ( ) ,
122122 ) ?;
123123 // Check that it is a valid initialized price account
124124 {
125- load_checked :: < PriceAccount > ( price_account , PC_VERSION , program_id) ?;
125+ load_checked :: < PriceAccount > ( price_account_info , PC_VERSION , program_id) ?;
126126 }
127- let account_len = price_account . try_data_len ( ) ?;
127+ let account_len = price_account_info . try_data_len ( ) ?;
128128 match account_len {
129129 PRICE_T_SIZE => {
130130 // Ensure account is still rent exempt after resizing
131131 let rent: Rent = Default :: default ( ) ;
132132 let lamports_needed: u64 = rent
133133 . minimum_balance ( size_of :: < PriceAccountWrapper > ( ) )
134- . saturating_sub ( price_account . lamports ( ) ) ;
134+ . saturating_sub ( price_account_info . lamports ( ) ) ;
135135 if lamports_needed > 0 {
136136 send_lamports (
137137 funding_account_info,
138- price_account ,
138+ price_account_info ,
139139 system_program,
140140 lamports_needed,
141141 ) ?;
142142 }
143143 // We do not need to zero allocate because we won't access the data in the same
144144 // instruction
145- price_account . realloc ( size_of :: < PriceAccountWrapper > ( ) , false ) ?;
145+ price_account_info . realloc ( size_of :: < PriceAccountWrapper > ( ) , false ) ?;
146146
147147 // Check that everything is ok
148148 check_valid_signable_account (
149149 program_id,
150- price_account ,
150+ price_account_info ,
151151 size_of :: < PriceAccountWrapper > ( ) ,
152152 ) ?;
153153 let mut price_account =
154- load_checked :: < PriceAccountWrapper > ( price_account , PC_VERSION , program_id) ?;
154+ load_checked :: < PriceAccountWrapper > ( price_account_info , PC_VERSION , program_id) ?;
155155 // Initialize Time Machine
156156 price_account. initialize_time_machine ( ) ?;
157157 Ok ( ( ) )
0 commit comments