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: the chain starts at an object without a predecessor, and every other link names a present object that carries the epoch the link records. 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.