pub fn plan_delivery(
records: &[ProvenanceRecord],
server: Option<Option<Hash32>>,
judge: Timestamp,
) -> HeldDelivery<'_>Expand description
Decide what of records (an asset’s chain, oldest first) goes to the server, given what its
feed lists for the asset (server: None when it does not list it, otherwise the hash of
the head it holds, None for an entry that carries no record) and the judging clock
(judging_clock).
- Not listed: held (
HoldReason::NotIndexed). - Listed: the
stretch_afterthe server’s head, unless atrash-restorein it undoes adeleteof the same stretch whoseretention_untilis at or beforejudge, which holds it (HoldReason::RestoreTooLate).