Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
fix bank::tests::test_feature_activation_loaded_programs_recompilatio…
Browse files Browse the repository at this point in the history
…n_phase
  • Loading branch information
HaoranYi committed Nov 21, 2023
1 parent 3a6cae5 commit 462fb24
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runtime/src/accounts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ use {
},
solana_sdk::{
account::{
is_builtin, is_builtin_or_executable, is_executable, Account, AccountSharedData,
ReadableAccount, WritableAccount,
is_builtin, is_builtin_or_executable, Account, AccountSharedData, ReadableAccount,
WritableAccount,
},
account_utils::StateMut,
bpf_loader_upgradeable::{self, UpgradeableLoaderState},
Expand Down Expand Up @@ -365,6 +365,7 @@ fn load_transaction_accounts(
error_counters.account_not_found += 1;
return Err(TransactionError::ProgramAccountNotFound);
}

if !is_builtin_or_executable(program_account) {
error_counters.invalid_program_for_execution += 1;
return Err(TransactionError::InvalidProgramForExecution);
Expand All @@ -386,7 +387,7 @@ fn load_transaction_accounts(
if let Some((owner_account, _)) =
accounts_db.load_with_fixed_root(ancestors, owner_id)
{
if !is_builtin(&owner_account) || !is_executable(&owner_account) {
if !is_builtin(&owner_account) {
error_counters.invalid_program_for_execution += 1;
return Err(TransactionError::InvalidProgramForExecution);
}
Expand Down

0 comments on commit 462fb24

Please sign in to comment.