Skip to content

Commit

Permalink
Use BoundedU128::max() in all places
Browse files Browse the repository at this point in the history
  • Loading branch information
fmkra committed Dec 22, 2023
1 parent 36e32ad commit 81a4a94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/channel/channel.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl ChannelImpl of ChannelTrait {
fn read_felt_vector_from_prover(ref self: Channel, values: Span<felt252>) {
let mut hash_data = ArrayTrait::<u32>::new();

assert(self.digest.low != 0xffffffffffffffffffffffffffffffff, 'digest low is 2^128-1');
assert(self.digest.low != BoundedU128::max(), 'digest low is 2^128-1');
(self.digest + 1).to_array_be(ref hash_data);

let mut i = 0;
Expand All @@ -94,7 +94,7 @@ impl ChannelImpl of ChannelTrait {
fn read_uint64_from_prover(ref self: Channel, value: u64) {
let mut hash_data = ArrayTrait::<u32>::new();

assert(self.digest.low != 0xffffffffffffffffffffffffffffffff, 'digest low is 2^128-1');
assert(self.digest.low != BoundedU128::max(), 'digest low is 2^128-1');
(self.digest + 1).to_array_be(ref hash_data);

let low: u32 = (value % 0x100000000).try_into().unwrap();
Expand Down

0 comments on commit 81a4a94

Please sign in to comment.