Prevent proof program from being invoked as an inner instruction
This commit is contained in:
parent
af80203522
commit
62b6eafd7c
|
@ -29,6 +29,11 @@ pub fn process_instruction(
|
|||
input: &[u8],
|
||||
invoke_context: &mut dyn InvokeContext,
|
||||
) -> Result<(), InstructionError> {
|
||||
if invoke_context.invoke_depth() != 1 {
|
||||
// Not supported as an inner instruction
|
||||
return Err(InstructionError::UnsupportedProgramId);
|
||||
}
|
||||
|
||||
match ProofInstruction::decode_type(program_id, input)
|
||||
.ok_or(InstructionError::InvalidInstructionData)?
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue