pub fn check_program(
account: &AccountView,
expected_program_id: &Address,
) -> ProgramResultExpand description
Check that an account is a specific program: its key matches
expected_program_id and it is flagged executable.
Matches the Jiminy-style free-function surface the winning-
architecture design calls for. Equivalent to constructing a
Program<'info, P> wrapper without requiring a generic
ProgramId impl - useful for
ad-hoc program pinning where the program ID is only known at
runtime (for instance, a caller-supplied cross-program id).