diff --git a/runtime/src/accounts/mod.rs b/runtime/src/accounts/mod.rs index 820c19c7b3fbb0..4d6e7fb13eda95 100644 --- a/runtime/src/accounts/mod.rs +++ b/runtime/src/accounts/mod.rs @@ -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); @@ -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); }