From aedc56ced9506f4c985dac04c366918d7623a3f8 Mon Sep 17 00:00:00 2001 From: Filip Krawczyk Date: Thu, 21 Dec 2023 10:08:28 +0100 Subject: [PATCH] Add assert to read_felt_from_prover --- src/channel/channel.cairo | 1 + 1 file changed, 1 insertion(+) diff --git a/src/channel/channel.cairo b/src/channel/channel.cairo index 452b03bcf..d9f654199 100644 --- a/src/channel/channel.cairo +++ b/src/channel/channel.cairo @@ -56,6 +56,7 @@ impl ChannelImpl of ChannelTrait { let value_u256: u256 = value.into(); let mut hash_data = ArrayTrait::::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);