From f3d63806c3e69d0259bedc7a02716732e6b948e9 Mon Sep 17 00:00:00 2001 From: Sergio Chouhy Date: Tue, 2 Sep 2025 12:56:01 -0300 Subject: [PATCH] fix tests --- .../guest/src/bin/privacy_preserving_circuit.rs | 4 ++-- nssa/src/privacy_preserving_transaction/circuit.rs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs b/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs index 947f6ea..5ec45eb 100644 --- a/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs +++ b/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs @@ -33,12 +33,12 @@ fn main() { // Check that the program is well behaved. // See the # Programs section for the definition of the `validate_execution` method. if !validate_execution(&pre_states, &post_states, program_id) { - panic!(); + panic!("Bad behaved program"); } let n_accounts = pre_states.len(); if visibility_mask.len() != n_accounts { - panic!(); + panic!("Invalid visibility mask length"); } // These lists will be the public outputs of this circuit diff --git a/nssa/src/privacy_preserving_transaction/circuit.rs b/nssa/src/privacy_preserving_transaction/circuit.rs index 24cdc4a..05d71da 100644 --- a/nssa/src/privacy_preserving_transaction/circuit.rs +++ b/nssa/src/privacy_preserving_transaction/circuit.rs @@ -111,6 +111,7 @@ mod tests { let program = Program::authenticated_transfer_program(); let sender = AccountWithMetadata { account: Account { + program_owner: program.id(), balance: 100, ..Account::default() }, @@ -177,11 +178,13 @@ mod tests { #[test] fn prove_privacy_preserving_execution_circuit_fully_private() { + let program = Program::authenticated_transfer_program(); let sender_pre = AccountWithMetadata { account: Account { balance: 100, nonce: 0xdeadbeef, - ..Account::default() + program_owner: program.id(), + data: vec![], }, is_authorized: true, };