[zk-token-proof] Add CUs to close account instruction (#33042)

add compute units for close context state account
This commit is contained in:
samkim-crypto 2023-08-30 11:16:09 -07:00 committed by GitHub
parent 3458a7d210
commit 79c02c8fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -134,6 +134,11 @@ declare_process_instruction!(process_instruction, 0, |invoke_context| {
match instruction {
ProofInstruction::CloseContextState => {
if native_programs_consume_cu {
invoke_context
.consume_checked(3_300)
.map_err(|_| InstructionError::ComputationalBudgetExceeded)?;
}
ic_msg!(invoke_context, "CloseContextState");
process_close_proof_context(invoke_context)
}