Skip to content

Commit

Permalink
Updates docs applying suggestion from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Oct 20, 2023
1 parent 668462d commit 3416c11
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions zebra-state/src/service/read/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ where
.or_else(|| db.sapling_tree_by_hash_or_height(hash_or_height))
}

/// Returns a list of Sapling [`NoteCommitmentSubtree`]s starting at `start_index`.
/// Returns a list of Sapling [`NoteCommitmentSubtree`]s with indexes in the provided range.
///
/// If there is no subtree at the first index in the range, the returned list is empty.
/// Otherwise, subtrees are continuous up to the finalized tip.
Expand Down Expand Up @@ -122,9 +122,8 @@ where
/// a `read_chain` function for retrieving the `range` of subtrees from `chain`, and
/// a `read_disk` function for retrieving the `range` from [`ZebraDb`].
///
/// Returns without calling `read_disk` if `read_chain` returns a subtree at the first subtree index
/// in the provided `range`. Otherwise, if `read_chain` and `read_disk` return different subtrees for
/// the same subtree index, ignores all the trees in `chain` after the first inconsistent tree.
/// Returns a consistent set of subtrees for the supplied chain fork and database.
/// Avoids reading the database if the subtrees are present in memory.
///
/// # Correctness
///
Expand Down

0 comments on commit 3416c11

Please sign in to comment.