Browse Source

fmt

al-update-winterfell
Paul-Henry Kajfasz 8 months ago
parent
commit
8bf6ef890d
No known key found for this signature in database GPG Key ID: 5EB89DCE97DB7417
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      src/merkle/mmr/peaks.rs

+ 6
- 6
src/merkle/mmr/peaks.rs

@ -19,12 +19,12 @@ pub struct MmrPeaks {
/// ///
/// Examples: /// Examples:
/// ///
/// - With 5 leaves, the binary `0b101`. The number of set bits is equal the number of
/// peaks, in this case there are 2 peaks. The 0-indexed least-significant position of the
/// bit determines the number of elements of a tree, so the rightmost tree has `2**0`
/// elements and the left most has `2**2`.
/// - With 12 leaves, the binary is `0b1100`, this case also has 2 peaks, the leftmost tree
/// has `2**3=8` elements, and the right most has `2**2=4` elements.
/// - With 5 leaves, the binary `0b101`. The number of set bits is equal the number of peaks,
/// in this case there are 2 peaks. The 0-indexed least-significant position of the bit
/// determines the number of elements of a tree, so the rightmost tree has `2**0` elements
/// and the left most has `2**2`.
/// - With 12 leaves, the binary is `0b1100`, this case also has 2 peaks, the leftmost tree has
/// `2**3=8` elements, and the right most has `2**2=4` elements.
num_leaves: usize, num_leaves: usize,
/// All the peaks of every tree in the MMR forest. The peaks are always ordered by number of /// All the peaks of every tree in the MMR forest. The peaks are always ordered by number of

Loading…
Cancel
Save