Add BPF program entrypoint return type (#8111)

This commit is contained in:
Jack May
2020-02-04 12:25:42 -08:00
committed by GitHub
parent 78f6ddc5b7
commit b6d09f1901
6 changed files with 21 additions and 19 deletions

View File

@ -2,7 +2,8 @@
extern crate solana_sdk;
use solana_sdk::{
account_info::AccountInfo, entrypoint, info, program_error::ProgramError, pubkey::Pubkey,
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, info,
program_error::ProgramError, pubkey::Pubkey,
};
entrypoint!(process_instruction);
@ -10,7 +11,7 @@ fn process_instruction(
_program_id: &Pubkey,
accounts: &[AccountInfo],
instruction_data: &[u8],
) -> Result<(), ProgramError> {
) -> ProgramResult {
match instruction_data[0] {
1 => {
info!("modify first account data");