Module ckb_merkle_mountain_range::helper
source · Functions
- Returns the height of the peaks in the mmr, presented by a bitmap. for example, for a mmr with 11 leaves, the mmr_size is 19, it will return 0b1011. 0b1011 indicates that the left peaks are at height 0, 1 and 3. 14 /
6 13 / \ /
2 5 9 12 17 / \ / \ / \ / \ /
0 1 3 4 7 8 10 11 15 16 18 - Returns the pos of the peaks in the mmr. for example, for a mmr with 11 leaves, the mmr_size is 19, it will return [14, 17, 18]. 14 /
6 13 / \ /
2 5 9 12 17 / \ / \ / \ / \ /
0 1 3 4 7 8 10 11 15 16 18