Skip to content

Commit

Permalink
[zk-token-proof] Add CUs to close account instruction (#33042)
Browse files Browse the repository at this point in the history
add compute units for close context state account
  • Loading branch information
samkim-crypto authored Aug 30, 2023
1 parent 3458a7d commit 79c02c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions programs/zk-token-proof/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 79c02c8

Please sign in to comment.