Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ConstanceBeguier committed Nov 19, 2024
1 parent b5d6447 commit 932f6a0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/bundle/commitments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ pub trait OrchardHash {
type OrchardDomain: OrchardDomainCommon;

/// Evaluate `orchard_digest` for the bundle as defined in
/// [ZIP-244: Transaction Identifier Non-Malleability][zip244]
/// for OrchardVanilla and as defined in
/// [ZIP-226: Transfer and Burn of Zcash Shielded Assets][zip226]
/// for OrchardZSA
///
/// [zip244]: https://zips.z.cash/zip-0244
/// [zip226]: https://zips.z.cash/zip-0226
fn hash_bundle_txid_data<A: Authorization, V: Copy + Into<i64>>(
bundle: &Bundle<A, V, Self::OrchardDomain>,
Expand All @@ -42,6 +46,10 @@ pub trait OrchardHash {
impl OrchardHash for OrchardVanilla {
type OrchardDomain = OrchardVanilla;

/// Evaluate `orchard_digest` for the bundle as defined in
/// [ZIP-244: Transaction Identifier Non-Malleability][zip244]
///
/// [zip244]: https://zips.z.cash/zip-0244
fn hash_bundle_txid_data<A: Authorization, V: Copy + Into<i64>>(
bundle: &Bundle<A, V, Self::OrchardDomain>,
) -> Blake2bHash {
Expand Down Expand Up @@ -87,6 +95,10 @@ impl OrchardHash for OrchardVanilla {
impl OrchardHash for OrchardZSA {
type OrchardDomain = OrchardZSA;

/// Evaluate `orchard_digest` for the bundle as defined in
/// [ZIP-226: Transfer and Burn of Zcash Shielded Assets][zip226]

/// [zip226]: https://zips.z.cash/zip-0226
fn hash_bundle_txid_data<A: Authorization, V: Copy + Into<i64>>(
bundle: &Bundle<A, V, Self::OrchardDomain>,
) -> Blake2bHash {
Expand Down Expand Up @@ -140,8 +152,12 @@ impl OrchardHash for OrchardZSA {
}

/// Evaluate `orchard_digest` for the bundle as defined in
/// [ZIP-244: Transaction Identifier Non-Malleability][zip244]
/// for OrchardVanilla and as defined in
/// [ZIP-226: Transfer and Burn of Zcash Shielded Assets][zip226]
/// for OrchardZSA
///
/// [zip244]: https://zips.z.cash/zip-0244
/// [zip226]: https://zips.z.cash/zip-0226
pub(crate) fn hash_bundle_txid_data<
A: Authorization,
Expand Down

0 comments on commit 932f6a0

Please sign in to comment.