fn select_chain(headers: &BTreeMap<u64, &Header>) -> Vec<u64>Expand description
Returns, in sequence order, the objects on the chain that ends at the tip: the complete object with the largest epoch, then the largest sequence.
An object is complete when every link on its chain holds, judged with the reclaim boundary of that object: the chain starts at an object without a predecessor or reaches a predecessor below the boundary, whether or not it is present, and every other link names a present object that carries the epoch the link records. The chain of the tip ends there, so objects below its boundary are not replayed. Only one instance writes under an epoch, so the epoch tells an object of the linking instance from another object under the same sequence. A create that was reported as failed may still leave its object, but every object written after that failure links past it, and every instance writes under an epoch above every object present when it opened, so neither such an object nor a late object of an earlier instance ends the chosen chain.