From b0543a1ae631a0db6ffc5550e5716545b7868215 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 15 Mar 2022 12:51:15 +0000 Subject: [PATCH] docs: update sysvar docs for load_instruction_at_checked (#22925) (#23673) * docs: update sysvar docs for load_instruction_at_checked Update the instruction introspection docs to use the updated load_instruction_at_checked function instead of deprecated load_instruction_at * Update to load_current_index_checked (cherry picked from commit 64e2d9dc47df08804095fbcf8af42e5274390e0e) Co-authored-by: Zayyan Faizal --- docs/src/implemented-proposals/instruction_introspection.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/implemented-proposals/instruction_introspection.md b/docs/src/implemented-proposals/instruction_introspection.md index 17d6be79cf..e0f122f90d 100644 --- a/docs/src/implemented-proposals/instruction_introspection.md +++ b/docs/src/implemented-proposals/instruction_introspection.md @@ -16,8 +16,8 @@ and received the Message's instruction data inside, and also the index of the cu Two helper functions to extract this data can be used: ``` -fn load_current_index(instruction_data: &[u8]) -> u16; -fn load_instruction_at(instruction_index: usize, instruction_data: &[u8]) -> Result; +fn load_current_index_checked(instruction_data: &[u8]) -> u16; +fn load_instruction_at_checked(instruction_index: usize, instruction_sysvar_account_info: &AccountInfo) -> Result; ``` The runtime will recognize this special instruction, serialize the Message instruction data