Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: str4d <[email protected]>
  • Loading branch information
nuttycom and str4d committed Jun 1, 2021
1 parent 76999eb commit 62bd06f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion zcash_primitives/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<P: Parameters>(
&self,
params: &P,
Expand Down
4 changes: 2 additions & 2 deletions zcash_primitives/src/sapling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,15 +526,15 @@ 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()
}
}

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()
}
Expand Down

0 comments on commit 62bd06f

Please sign in to comment.