Cleanup and feature gate instruction processing (#12359)

This commit is contained in:
sakridge
2020-09-20 10:58:12 -07:00
committed by GitHub
parent 65b247a922
commit 22d8b3c3f8
5 changed files with 43 additions and 19 deletions

View File

@ -26,14 +26,14 @@ fn process_instruction(
return Err(ProgramError::InvalidAccountData);
}
let instruction = instructions::get_instruction(
let instruction = instructions::load_instruction_at(
secp_instruction_index as usize,
&instruction_accounts.try_borrow_data()?,
)
.map_err(|_| ProgramError::InvalidAccountData)?;
let current_instruction =
instructions::get_current_instruction(&instruction_accounts.try_borrow_data()?);
instructions::load_current_index(&instruction_accounts.try_borrow_data()?);
let my_index = instruction_data[1] as u16;
assert_eq!(current_instruction, my_index);