Skip to content

Commit

Permalink
Refactor cols_by_size and remove unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyalesokhin-starkware committed Nov 18, 2024
1 parent db85303 commit 3a2d7a4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions stwo_cairo_verifier/src/vcs/verifier.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,8 @@ impl MerkleVerifierImpl<
let mut column_log_sizes = self.column_log_sizes.span();
let mut res_dict = Default::default();
let mut col_index = 0;
let mut max_size = 0;
while !column_log_sizes.is_empty() {
let col_size = *column_log_sizes.pop_front().unwrap();
if col_size > max_size {
max_size = col_size;
}
let (res_dict_entry, value) = res_dict.entry(col_size.into());
while let Option::Some(col_size) = column_log_sizes.pop_front() {
let (res_dict_entry, value) = res_dict.entry((*col_size).into());
let mut value = value.deref_or(array![]);
value.append(col_index);
res_dict = res_dict_entry.finalize(NullableTrait::new(value));
Expand Down

0 comments on commit 3a2d7a4

Please sign in to comment.