Skip to content

Commit

Permalink
minor: remove code duplication (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad authored Jun 21, 2022
1 parent 0213f9a commit eb1f66f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/inversion_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,7 @@ pub struct InversionNode<F: Field> {

impl<F: Field> InversionTree<F> {
pub fn new(data_shards: usize, parity_shards: usize) -> InversionTree<F> {
InversionTree {
root: Mutex::new(InversionNode::new(
Some(Arc::new(Matrix::identity(data_shards))),
data_shards + parity_shards,
)),
total_shards: data_shards + parity_shards,
total_indices: AtomicUsize::new(0),
indices_limit: DEFAULT_INDICES_LIMIT,
}
Self::with_limit(data_shards, parity_shards, DEFAULT_INDICES_LIMIT)
}

pub fn with_limit(
Expand Down

0 comments on commit eb1f66f

Please sign in to comment.