* Instruction sysvar fixes, additions (#20958)
(cherry picked from commit 4fe3354c8f
)
# Conflicts:
# programs/bpf/rust/sysvar/src/lib.rs
# programs/bpf/tests/programs.rs
# sdk/program/src/sysvar/instructions.rs
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
@@ -29,11 +29,9 @@ fn process_instruction(
|
||||
let instruction = instructions::load_instruction_at_checked(
|
||||
secp_instruction_index as usize,
|
||||
instruction_accounts,
|
||||
)
|
||||
.map_err(|_| ProgramError::InvalidAccountData)?;
|
||||
)?;
|
||||
|
||||
let current_instruction =
|
||||
instructions::load_current_index(&instruction_accounts.try_borrow_data()?);
|
||||
let current_instruction = instructions::load_current_index_checked(instruction_accounts)?;
|
||||
let my_index = instruction_data[1] as u16;
|
||||
assert_eq!(current_instruction, my_index);
|
||||
|
||||
|
Reference in New Issue
Block a user