Skip to content

Commit

Permalink
fix: remove prints
Browse files Browse the repository at this point in the history
  • Loading branch information
olehmisar committed Sep 1, 2024
1 parent e6d9fff commit c2c03c4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib.nr
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl<let MaxPaddedBytes: u32, let PaddedChunksMinusOne: u32, let MaxBytes: u32>

fn len(self) -> u32 { self.byte_length }
fn get(self, idx: Field) -> u8 { self.body[idx] }
fn get_body(self) -> [u8] { let x = self.body.as_slice(); println(f"X = {x}"); x }
fn get_body(self) -> [u8] { let x = self.body.as_slice(); x }

/**
* @brief given some `haystack` 31-byte chunks, validate that there exist `num_full_chunks`
Expand Down Expand Up @@ -258,7 +258,7 @@ impl<let MaxPaddedBytes: u32, let PaddedChunks: u32, let MaxBytes: u32> StringBo
let mut starting_needle_byte_index_of_final_chunk: Field = 0;
let mut chunk_index_of_final_haystack_chunk_with_matching_needle_bytes: Field = 0;
let mut num_full_chunks = 0;
println("A");

// is there only one haystack chunk that contains needle bytes?
let merge_initial_final_needle_chunks = lt_f(substring_length as Field, num_bytes_in_first_chunk as Field);

Expand Down Expand Up @@ -332,7 +332,6 @@ impl<let MaxPaddedBytes: u32, let PaddedChunks: u32, let MaxBytes: u32> StringBo
let byte: Field = predicate * (lhs - rhs) + rhs;
initial_chunk[i] = byte;
}
println("C");

// If `merge_initial_final_needle_chunks = true`, `final_chunk` will contain the full needle data,
// this requires some complex logic to determine where we are sourcing the needle bytes from.
Expand Down Expand Up @@ -370,7 +369,6 @@ impl<let MaxPaddedBytes: u32, let PaddedChunks: u32, let MaxBytes: u32> StringBo

final_chunk[i] = destination_byte;
}
println("D");

// TODO: moving this above the previous code block adds 31 gates. find out why? :/
let mut initial_needle_chunk: Field = 0;
Expand Down

0 comments on commit c2c03c4

Please sign in to comment.