Cleanup and feature gate instruction processing (#12359) (#12384)

(cherry picked from commit 22d8b3c3f8)

Co-authored-by: sakridge <sakridge@gmail.com>
This commit is contained in:
mergify[bot]
2020-09-22 06:19:14 +00:00
committed by GitHub
parent a85a2839e4
commit 0f3208dece
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);