diff --git a/zcash_primitives/src/consensus.rs b/zcash_primitives/src/consensus.rs index 02e3913f7..07f12f4b3 100644 --- a/zcash_primitives/src/consensus.rs +++ b/zcash_primitives/src/consensus.rs @@ -512,7 +512,12 @@ impl BranchId { /// Returns the range of heights for the consensus epoch associated with this branch id. /// - /// The return type of this value is slightly more precise than [`Self::height_range`]. + /// The return type of this value is slightly more precise than [`Self::height_range`]: + /// - `Some((x, Some(y)))` means that the consensus rules corresponding to this branch id + /// are in effect for the range `x..y` + /// - `Some((x, None))` means that the consensus rules corresponding to this branch id are + /// in effect for the range `x..` + /// - `None` means that the consensus rules corresponding to this branch id are never in effect. pub fn height_bounds( &self, params: &P, diff --git a/zcash_primitives/src/sapling.rs b/zcash_primitives/src/sapling.rs index 12c36bde9..8b0207ec5 100644 --- a/zcash_primitives/src/sapling.rs +++ b/zcash_primitives/src/sapling.rs @@ -526,7 +526,7 @@ pub mod testing { use super::{Node, Note, NoteValue, PaymentAddress, Rseed}; prop_compose! { - pub fn arb_note_value()(value in 0u64..MAX_MONEY as u64) -> NoteValue { + pub fn arb_note_value()(value in 0u64..=MAX_MONEY as u64) -> NoteValue { NoteValue::try_from(value).unwrap() } } @@ -534,7 +534,7 @@ pub mod testing { prop_compose! { /// The pub fn arb_positive_note_value(bound: u64)( - value in 1u64..(min(bound, MAX_MONEY as u64)) + value in 1u64..=(min(bound, MAX_MONEY as u64)) ) -> NoteValue { NoteValue::try_from(value).unwrap() }