solana_svm::program_loader

Function load_program_with_pubkey

Source
pub fn load_program_with_pubkey<CB: TransactionProcessingCallback>(
    callbacks: &CB,
    environments: &ProgramRuntimeEnvironments,
    pubkey: &Pubkey,
    slot: Slot,
    reload: bool,
) -> Option<Arc<ProgramCacheEntry>>
Expand description

Loads the program with the given pubkey.

If the account doesn’t exist it returns None. If the account does exist, it must be a program account (belong to one of the program loaders). Returns Some(InvalidAccountData) if the program account is Closed, contains invalid data or any of the programdata accounts are invalid.