Function grin_core::core::pmmr::peak_map_height

source ·
pub fn peak_map_height(size: u64) -> (u64, u64)
Expand description

peak bitmap and height of next node in mmr of given size Example: on size 4 returns (0b11, 0) as mmr tree of size 4 is 2 /
0 1 3 with 0b11 indicating the presence of peaks of height 0 and 1, and 0 the height of the next node 4, which is a leaf NOTE: the peak map also encodes the path taken from the root to the added node since the path turns left (resp. right) if-and-only-if a peak at that height is absent (resp. present)