CustomError from Vec->u32

This commit is contained in:
Tyera Eulberg
2019-04-11 11:41:12 -07:00
committed by Tyera Eulberg
parent f669ae5868
commit d31989f878
5 changed files with 12 additions and 42 deletions

View File

@ -1,5 +1,4 @@
use crate::token_state::TokenState;
use bincode::serialize;
use log::*;
use solana_sdk::account::KeyedAccount;
use solana_sdk::instruction::InstructionError;
@ -15,6 +14,6 @@ pub fn process_instruction(
TokenState::process(program_id, info, input).map_err(|e| {
error!("error: {:?}", e);
InstructionError::CustomError(serialize(&e).unwrap())
InstructionError::CustomError(e as u32)
})
}