parent
ab3aea55c0
commit
c7d5913a90
|
@ -7,6 +7,12 @@ and this library adheres to Rust's notion of
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
- `sapling_crypto::builder::BundleType::num_outputs` now matches the previous
|
||||
behaviour for Sapling bundle padding, by including dummy outputs if there are
|
||||
no requested outputs but some requested spends, and `bundle_required` is set
|
||||
to `false` (as in `BundleType::DEFAULT`).
|
||||
|
||||
## [0.1.0] - 2024-01-26
|
||||
The crate has been completely rewritten. See [`zcash/librustzcash`] for the
|
||||
history of this rewrite.
|
||||
|
|
|
@ -90,13 +90,13 @@ impl BundleType {
|
|||
requested_outputs: usize,
|
||||
) -> Result<usize, &'static str> {
|
||||
match self {
|
||||
BundleType::Transactional { bundle_required } => {
|
||||
Ok(if *bundle_required || requested_outputs > 0 {
|
||||
BundleType::Transactional { bundle_required } => Ok(
|
||||
if *bundle_required || requested_spends > 0 || requested_outputs > 0 {
|
||||
core::cmp::max(requested_outputs, MIN_SHIELDED_OUTPUTS)
|
||||
} else {
|
||||
0
|
||||
})
|
||||
}
|
||||
},
|
||||
),
|
||||
BundleType::Coinbase => {
|
||||
if requested_spends == 0 {
|
||||
Ok(requested_outputs)
|
||||
|
|
Loading…
Reference in New Issue