fix: update rust example to latest solana sdk

This commit is contained in:
Jack May
2020-02-25 09:48:12 -08:00
committed by Michael Vines
parent e3516bbcfd
commit 11db9497a7
3 changed files with 12 additions and 7 deletions

View File

@ -4,8 +4,7 @@
extern crate solana_sdk;
use solana_sdk::{
account_info::AccountInfo, entrypoint, info, log::*, program_error::ProgramError,
pubkey::Pubkey,
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, info, log::*, pubkey::Pubkey,
};
#[derive(Debug, PartialEq)]
@ -24,8 +23,8 @@ entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
ix_data: &[u8],
) -> Result<(), ProgramError> {
instruction_data: &[u8],
) -> ProgramResult {
info!("Program identifier:");
program_id.log();
@ -33,7 +32,7 @@ fn process_instruction(
// 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.
info!("Account keys and instruction input data:");
sol_log_params(accounts, ix_data);
sol_log_params(accounts, instruction_data);
{
// Test - use std methods, unwrap