Add get_processed_sibling_instruction syscall (#22859)

This commit is contained in:
Jack May
2022-02-02 16:45:57 -08:00
committed by GitHub
parent 75563f6c7b
commit ab02dba96f
19 changed files with 898 additions and 61 deletions

View File

@ -3,7 +3,7 @@
use {
bytemuck::Pod,
solana_program_runtime::{ic_msg, invoke_context::InvokeContext},
solana_sdk::instruction::InstructionError,
solana_sdk::instruction::{InstructionError, TRANSACTION_LEVEL_STACK_HEIGHT},
solana_zk_token_sdk::zk_token_proof_instruction::*,
std::result::Result,
};
@ -28,7 +28,7 @@ pub fn process_instruction(
input: &[u8],
invoke_context: &mut InvokeContext,
) -> Result<(), InstructionError> {
if invoke_context.get_invoke_depth() != 1 {
if invoke_context.get_stack_height() != TRANSACTION_LEVEL_STACK_HEIGHT {
// Not supported as an inner instruction
return Err(InstructionError::UnsupportedProgramId);
}