Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into simplify-zcash-script…
Browse files Browse the repository at this point in the history
…-api
  • Loading branch information
conradoplg committed Jun 14, 2024
2 parents e7e4c5b + f2bc027 commit 17aeb24
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zebra-chain/src/sapling/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub(super) fn find_group_hash(d: [u8; 8], m: &[u8]) -> jubjub::ExtendedPoint {
let gh = jubjub_group_hash(d, &tag[..]);

// We don't want to overflow and start reusing generators
assert!(tag[i] != u8::max_value());
assert!(tag[i] != u8::MAX);
tag[i] += 1;

if let Some(gh) = gh {
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/serialization/tests/preallocate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn u8_deser_throws_when_input_too_large() {
/// Confirm that every u8 takes exactly 1 byte when serialized.
/// This verifies that our calculated `MAX_U8_ALLOCATION` is indeed an upper bound.
fn u8_size_is_correct() {
for byte in std::u8::MIN..=std::u8::MAX {
for byte in u8::MIN..=u8::MAX {
let serialized = byte
.zcash_serialize_to_vec()
.expect("Serialization to vec must succeed");
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/work/difficulty/arbitrary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Arbitrary for Work {
// In the Zcash protocol, a Work is converted from an ExpandedDifficulty.
// But some randomised difficulties are impractically large, and will
// never appear in any real-world block. So we just use a random Work value.
(1..std::u128::MAX).prop_map(Work).boxed()
(1..u128::MAX).prop_map(Work).boxed()
}

type Strategy = BoxedStrategy<Self>;
Expand Down

0 comments on commit 17aeb24

Please sign in to comment.