Skip to content

Commit

Permalink
docs: fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbinth committed Jun 28, 2024
1 parent 849e96b commit 14d03dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions objects/src/transaction/inputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl TransactionInputs {
/// The commitment is composed of:
///
/// - nullifier, which prevents double spend and provides unlinkability.
/// - an optional note_id, which allows for delayed note authentication.
/// - an optional note hash, which allows for delayed note authentication.
pub trait ToInputNoteCommitments {
fn nullifier(&self) -> Nullifier;
fn note_hash(&self) -> Option<Digest>;
Expand Down Expand Up @@ -304,11 +304,11 @@ fn build_input_note_commitment<T: ToInputNoteCommitments>(notes: &[T]) -> Digest
let mut elements: Vec<Felt> = Vec::with_capacity(notes.len() * 2);
for commitment_data in notes {
let nullifier = commitment_data.nullifier();
let zero_or_notehash =
let zero_or_note_hash =
&commitment_data.note_hash().map_or(Word::default(), |note_id| note_id.into());

elements.extend_from_slice(nullifier.as_elements());
elements.extend_from_slice(zero_or_notehash);
elements.extend_from_slice(zero_or_note_hash);
}
Hasher::hash_elements(&elements)
}
Expand Down

0 comments on commit 14d03dc

Please sign in to comment.