Pass the correct program_id to programs (#8630)

This commit is contained in:
Jack May
2020-03-05 10:57:35 -08:00
committed by GitHub
parent 97c5fb8141
commit 5e3ce30d02
6 changed files with 45 additions and 25 deletions

View File

@ -4,7 +4,8 @@
extern crate solana_sdk;
use solana_sdk::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, info, log::*, pubkey::Pubkey,
account_info::AccountInfo, bpf_loader, entrypoint, entrypoint::ProgramResult, info, log::*,
pubkey::Pubkey,
};
#[derive(Debug, PartialEq)]
@ -28,6 +29,8 @@ fn process_instruction(
info!("Program identifier:");
program_id.log();
assert!(!bpf_loader::check_id(program_id));
// Log the provided account keys and instruction input data. In the case of
// the no-op program, no account keys or input data are expected but real
// programs will have specific requirements so they can do their work.