Skip to main content

heal_post_bundles

Function heal_post_bundles 

Source
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_bundles must 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_bundles are the bundles returned directly by the servers we visited, paired with the Peer we 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 the peer inside the bundle header, whose address is whatever the bundle’s publisher chose to put there.