Skip to content

Commit

Permalink
fix: return a ref of empty array on un-intended fn on AggregationMerk…
Browse files Browse the repository at this point in the history
…leSumTree
  • Loading branch information
sifnoc committed Dec 7, 2023
1 parent c8a2d7f commit 679ed56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aggregation_merkle_sum_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl<const N_CURRENCIES: usize, const N_BYTES: usize> Tree<N_CURRENCIES, N_BYTES
}

fn leaves(&self) -> &[Node<N_CURRENCIES>] {
&self.nodes[0]
&[]
}

fn nodes(&self) -> &[Vec<Node<N_CURRENCIES>>] {
Expand All @@ -47,7 +47,7 @@ impl<const N_CURRENCIES: usize, const N_BYTES: usize> Tree<N_CURRENCIES, N_BYTES
}

fn entries(&self) -> &[Entry<N_CURRENCIES>] {
self.mini_trees[0].entries()
&[]
}

fn get_entry(&self, user_index: usize) -> &Entry<N_CURRENCIES> {
Expand Down

0 comments on commit 679ed56

Please sign in to comment.