add checked instructions sysvar api (#20790)

This commit is contained in:
Jack May
2021-10-19 21:01:58 -07:00
committed by GitHub
parent 58164517e4
commit a8098f37d0
5 changed files with 116 additions and 7 deletions

View File

@ -33,9 +33,9 @@ fn process_instruction(
return Err(ProgramError::InvalidAccountData);
}
let instruction = instructions::load_instruction_at(
let instruction = instructions::load_instruction_at_checked(
secp_instruction_index as usize,
&instruction_accounts.try_borrow_data()?,
instruction_accounts,
)
.map_err(|_| ProgramError::InvalidAccountData)?;