Module iterator

Module iterator 

Source
Expand description

Iterators for traversing MMRs of a given size, and functions for computing various MMR properties from their output. These are lower levels methods that are useful for implementing new MMR variants or extensions.

Structsยง

PathIterator
A PathIterator returns a (parent_pos, sibling_pos) tuple for the sibling of each node along the path from a given perfect binary tree peak to a designated leaf, not including the peak itself.
PeakIterator
A PeakIterator returns a (position, height) tuple for each peak in an MMR with the given size, in decreasing order of height.