[][src]Function grin_core::core::pmmr::peak_map_height

pub fn peak_map_height(pos: u64) -> (u64, u64)

return (peak_map, pos_height) of given 0-based node pos prior to its addition Example: on input 4 returns (0b11, 0) as mmr state before adding 4 was 2 /
0 1 3 with 0b11 indicating presence of peaks of height 0 and 1. 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)