Improve invoke_signed() docs (#13405)

(cherry picked from commit 8c4995b22b)

Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
mergify[bot]
2020-11-05 01:07:24 +00:00
committed by GitHub
parent 3a98042753
commit 8314ab4508

View File

@ -1,11 +1,17 @@
use crate::{account_info::AccountInfo, entrypoint::ProgramResult, instruction::Instruction}; use crate::{account_info::AccountInfo, entrypoint::ProgramResult, instruction::Instruction};
/// Invoke a cross-program instruction /// Invoke a cross-program instruction
///
/// Note that the program id of the instruction being issued must also be included in
/// `account_infos`.
pub fn invoke(instruction: &Instruction, account_infos: &[AccountInfo]) -> ProgramResult { pub fn invoke(instruction: &Instruction, account_infos: &[AccountInfo]) -> ProgramResult {
invoke_signed(instruction, account_infos, &[]) invoke_signed(instruction, account_infos, &[])
} }
/// Invoke a cross-program instruction with program signatures /// Invoke a cross-program instruction with program signatures
///
/// Note that the program id of the instruction being issued must also be included in
/// `account_infos`.
pub fn invoke_signed( pub fn invoke_signed(
instruction: &Instruction, instruction: &Instruction,
account_infos: &[AccountInfo], account_infos: &[AccountInfo],