Correct the doc comment for the `Builder::value_balance` method added in #352.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2022-09-19 13:27:16 +01:00
parent f206b3f5d4
commit fbfc8f9ed8
1 changed files with 6 additions and 1 deletions

View File

@ -306,7 +306,12 @@ impl Builder {
/// minus the value of all outputs.
///
/// Useful for balancing a transaction, as the value balance of an individual bundle
/// can be non-zero, but a transaction may not have a positive total value balance.
/// can be non-zero. Each bundle's value balance is [added] to the transparent
/// transaction value pool, which [must not have a negative value]. (If it were
/// negative, the transaction would output more value than it receives in inputs.)
///
/// [added]: https://zips.z.cash/protocol/protocol.pdf#orchardbalance
/// [must not have a negative value]: https://zips.z.cash/protocol/protocol.pdf#transactions
pub fn value_balance<V: TryFrom<i64>>(&self) -> Result<V, value::OverflowError> {
let value_balance = self
.spends