Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Okm165 committed Jan 3, 2024
1 parent f6bb6af commit 9e30c25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/air/public_input.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ impl PublicInputImpl of PublicInputTrait {
ArrayAppendTrait::<_, u256>::append_big_endian(ref hash_data, (*self.rc_max).into());
ArrayAppendTrait::<_, u256>::append_big_endian(ref hash_data, (*self.layout).into());

// Dynamic params.
let mut i: u32 = 0;
loop {
if i == self.dynamic_params.len() {
Expand All @@ -65,6 +66,7 @@ impl PublicInputImpl of PublicInputTrait {
>::append_big_endian(ref hash_data, (*self.dynamic_params.at(i)).into());
};

// Segments.
let mut i: u32 = 0;
loop {
if i == self.segments.len() {
Expand All @@ -79,10 +81,12 @@ impl PublicInputImpl of PublicInputTrait {

ArrayAppendTrait::<_, u256>::append_big_endian(ref hash_data, (*self.padding_addr).into());
ArrayAppendTrait::<_, u256>::append_big_endian(ref hash_data, (*self.padding_value).into());
hash_data.append(self.continuous_page_headers.len().flip_endianness());
hash_data.append((1 + self.continuous_page_headers.len()).flip_endianness());
// Main page.
hash_data.append(self.main_page.len().flip_endianness());
ArrayAppendTrait::<_, u256>::append_big_endian(ref hash_data, main_page_hash.into());

// Add the rest of the pages.
let mut i: u32 = 0;
loop {
if i == self.continuous_page_headers.len() {
Expand Down

0 comments on commit 9e30c25

Please sign in to comment.