Skip to content

Commit

Permalink
handle error for compute_roots private function
Browse files Browse the repository at this point in the history
  • Loading branch information
TAdev0 committed Oct 3, 2024
1 parent 9186a3d commit b2ebe54
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/consensus/src/types/utreexo.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,9 @@ pub impl UtreexoAccumulatorImpl of UtreexoAccumulator {
return Result::Ok(());
};

// TODO: handle error progration for compute_roots
let computed_roots: Span<felt252> = compute_roots(
outpoints_hashes, *self.num_leaves, proof
);
)?;

let mut number_matched_roots: u32 = 0;

Expand Down Expand Up @@ -302,9 +301,9 @@ fn compute_root(proof: Span<felt252>, mut leaf_index: u64, mut curr_node: felt25
/// Computes a set of roots from a proof.
fn compute_roots(
outpoints_hashes: Span<felt252>, num_leaves: u64, proof: @UtreexoBatchProof,
) -> Span<felt252> {
) -> Result<Span<felt252>, UtreexoError> {
// TODO
array![].span()
Result::Ok(array![].span())
}

pub impl UtreexoStateDefault of Default<UtreexoState> {
Expand Down

0 comments on commit b2ebe54

Please sign in to comment.