pub fn cross_pool_ensure_heights(
sapling: &BTreeSet<BlockHeight>,
orchard: &BTreeSet<BlockHeight>,
ironwood: &BTreeSet<BlockHeight>,
) -> [BTreeSet<BlockHeight>; 3]orchard only.Expand description
Given the checkpoint heights present in each of the three shielded pools’ note commitment trees, in the order (Sapling, Orchard, Ironwood), returns for each pool the set of checkpoint heights it must ensure so that every pool ends up checkpointed at every height that is checkpointed in any pool.
The set returned for a given pool is the union of the checkpoint heights of the other two pools. Consequently the union of a pool’s existing checkpoint heights with the heights returned for it equals the union of all three pools’ checkpoint heights, so all three trees end up checkpointed at the same set of heights. When one pool has no checkpoints, the sets returned for the other two reduce to each other’s heights, matching the prior two-pool behavior.