File tree 2 files changed +4
-19
lines changed
2 files changed +4
-19
lines changed Original file line number Diff line number Diff line change 13
13
instruction:: UpdPriceArgs ,
14
14
utils:: {
15
15
check_valid_funding_account,
16
- check_valid_writable_account_without_rent_check ,
16
+ check_valid_writable_account ,
17
17
get_status_for_conf_price_ratio,
18
18
is_component_update,
19
19
pyth_assert,
@@ -123,7 +123,7 @@ pub fn upd_price(
123
123
} ?;
124
124
125
125
check_valid_funding_account ( funding_account) ?;
126
- check_valid_writable_account_without_rent_check ( program_id, price_account) ?;
126
+ check_valid_writable_account ( program_id, price_account) ?;
127
127
// Check clock
128
128
let clock = Clock :: from_account_info ( clock_account) ?;
129
129
Original file line number Diff line number Diff line change @@ -115,9 +115,7 @@ fn valid_writable_account(
115
115
program_id : & Pubkey ,
116
116
account : & AccountInfo ,
117
117
) -> Result < bool , ProgramError > {
118
- Ok ( account. is_writable
119
- && account. owner == program_id
120
- && get_rent ( ) ?. is_exempt ( account. lamports ( ) , account. data_len ( ) ) )
118
+ Ok ( account. is_writable && account. owner == program_id)
121
119
}
122
120
123
121
pub fn check_valid_writable_account (
@@ -130,24 +128,11 @@ pub fn check_valid_writable_account(
130
128
)
131
129
}
132
130
133
- pub fn check_valid_writable_account_without_rent_check (
134
- program_id : & Pubkey ,
135
- account : & AccountInfo ,
136
- ) -> Result < ( ) , ProgramError > {
137
- pyth_assert (
138
- account. is_writable && account. owner == program_id,
139
- OracleError :: InvalidWritableAccount . into ( ) ,
140
- )
141
- }
142
-
143
131
fn valid_readable_account (
144
132
program_id : & Pubkey ,
145
133
account : & AccountInfo ,
146
134
) -> Result < bool , ProgramError > {
147
- Ok (
148
- account. owner == program_id
149
- && get_rent ( ) ?. is_exempt ( account. lamports ( ) , account. data_len ( ) ) ,
150
- )
135
+ Ok ( account. owner == program_id)
151
136
}
152
137
153
138
pub fn check_valid_readable_account (
You can’t perform that action at this time.
0 commit comments