pub fn heal_post_bundles(
runtime_services: Arc<RuntimeServices>,
sponsor_id: Id,
bucket_location: BucketLocation,
donor_bundles: &[EncodedPostBundleV1],
target_bundles: &[(Peer, EncodedPostBundleV1)],
)Expand description
Spawns a background task that serially heals every target server whose bundle is missing posts that a donor bundle has.
donor_bundlesmust be authoritative bundles (verified, holding at least one genuinely signed post) - direct responses or cached snapshots, including snapshots signed by servers that have since died.target_bundlesare the bundles returned directly by the servers we visited, paired with thePeerwe actually sent the RPC to. We only heal servers we have spoken to (never one we only hold a cached snapshot of), and we address them using that authenticated peer rather than thepeerinside the bundle header, whose address is whatever the bundle’s publisher chose to put there.