Skip to content

Commit

Permalink
fix shielded ptx check
Browse files Browse the repository at this point in the history
  • Loading branch information
XuyangSong committed Nov 16, 2023
1 parent d4f2ae0 commit ebab25f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions taiga_halo2/src/shielded_ptx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl ShieldedPartialTransaction {
fn check_nullifiers(&self) -> Result<(), TransactionError> {
assert_eq!(NUM_NOTE, 2);
let action_nfs = self.get_nullifiers();
for vp_info in self.inputs.iter() {
for vp_info in self.inputs.iter().chain(self.outputs.iter()) {
for nfs in vp_info.get_nullifiers().iter() {
// Check the vp actually uses the input notes from action circuits.
if !((action_nfs[0].inner() == nfs[0] && action_nfs[1].inner() == nfs[1])
Expand Down Expand Up @@ -200,7 +200,7 @@ impl ShieldedPartialTransaction {
fn check_note_commitments(&self) -> Result<(), TransactionError> {
assert_eq!(NUM_NOTE, 2);
let action_cms = self.get_output_cms();
for vp_info in self.outputs.iter() {
for vp_info in self.inputs.iter().chain(self.outputs.iter()) {
for cms in vp_info.get_note_commitments().iter() {
// Check the vp actually uses the output notes from action circuits.
if !((action_cms[0] == cms[0] && action_cms[1] == cms[1])
Expand Down

0 comments on commit ebab25f

Please sign in to comment.