Skip to content

Commit

Permalink
Add assert to read_felt_from_prover
Browse files Browse the repository at this point in the history
  • Loading branch information
fmkra committed Dec 21, 2023
1 parent 88c2d69 commit aedc56c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/channel/channel.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ impl ChannelImpl of ChannelTrait {
let value_u256: u256 = value.into();
let mut hash_data = ArrayTrait::<u32>::new();

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

Expand Down

0 comments on commit aedc56c

Please sign in to comment.