diff --git a/zebra-chain/src/transaction/joinsplit.rs b/zebra-chain/src/transaction/joinsplit.rs index bd808bab..b54c4c22 100644 --- a/zebra-chain/src/transaction/joinsplit.rs +++ b/zebra-chain/src/transaction/joinsplit.rs @@ -56,8 +56,15 @@ pub struct JoinSplitData { /// /// Storing this separately from `rest` ensures that it is impossible /// to construct an invalid `JoinSplitData` with no `JoinSplit`s. + /// + /// However, it's not necessary to access or process `first` and `rest` + /// separately, as the [`JoinSplitData::joinsplits`] method provides an + /// iterator over all of the `JoinSplit`s. pub first: JoinSplit

, /// The rest of the JoinSplit descriptions, using proofs of type `P`. + /// + /// The [`JoinSplitData::joinsplits`] method provides an iterator over + /// all `JoinSplit`s. pub rest: Vec>, /// The public key for the JoinSplit signature. // XXX refine to a Zcash-flavored Ed25519 pubkey. diff --git a/zebra-chain/src/transaction/shielded_data.rs b/zebra-chain/src/transaction/shielded_data.rs index ba7df5e4..b1d13d7a 100644 --- a/zebra-chain/src/transaction/shielded_data.rs +++ b/zebra-chain/src/transaction/shielded_data.rs @@ -66,10 +66,21 @@ pub struct ShieldedData { /// /// Storing this separately ensures that it is impossible to construct /// an invalid `ShieldedData` with no spends or outputs. + /// + /// However, it's not necessary to access or process `first` and `rest` + /// separately, as the [`ShieldedData::spends`] and [`ShieldedData::outputs`] + /// methods provide iterators over all of the [`SpendDescription`]s and + /// [`OutputDescription`]s. pub first: Either, /// The rest of the [`SpendDescription`]s for this transaction. + /// + /// Note that the [`ShieldedData::spends`] method provides an iterator + /// over all spend descriptions. pub rest_spends: Vec, /// The rest of the [`OutputDescription`]s for this transaction. + /// + /// Note that the [`ShieldedData::outputs`] method provides an iterator + /// over all output descriptions. pub rest_outputs: Vec, /// A signature on the transaction hash. pub binding_sig: redjubjub::Signature,