Apply suggestions from code review

Co-authored-by: str4d <jack@electriccoin.co>
This commit is contained in:
Kris Nuttycombe 2021-05-27 16:33:46 -06:00 committed by Kris Nuttycombe
parent 76999eb5c7
commit 62bd06f14e
2 changed files with 8 additions and 3 deletions

View File

@ -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,

View File

@ -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()
}