Skip to content

Commit

Permalink
debug: use usize.div_ceil
Browse files Browse the repository at this point in the history
  • Loading branch information
suiwater committed Mar 18, 2024
1 parent b806150 commit e81fa72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commitment_scheme/merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::commitment_scheme::utils::{
tree_data_as_mut_ref, ColumnArray, TreeData,
};
use crate::core::fields::{Field, IntoSlice};
use crate::math::utils::{prev_pow_two, usize_div_ceil};
use crate::math::utils::prev_pow_two;

pub struct MerkleTree<T: Field + Sized + Debug + Display, H: Hasher> {
pub bottom_layer: Vec<T>,
Expand Down Expand Up @@ -61,7 +61,7 @@ where
let bottom_layer = column_to_row_major(trace);

// Allocate rest of the tree.
let bottom_layer_length_nodes = usize_div_ceil(bottom_layer.len(), bottom_layer_block_size);
let bottom_layer_length_nodes = bottom_layer.len().div_ceil(bottom_layer_block_size);
let tree_data =
allocate_balanced_tree(bottom_layer_length_nodes, H::BLOCK_SIZE, H::OUTPUT_SIZE);

Expand Down

0 comments on commit e81fa72

Please sign in to comment.