Skip to main content

fetch

Function fetch 

Source
pub async fn fetch(args: &FetchArgs, config_path: Option<&Path>) -> Result<()>
Expand description

Fetch a single blob over cdn/client/v1, auto-opening/reusing the caller’s PaymentPool deposit, and write it atomically to --output. config_path (the global --config) supplies relays (#935), discovery (#936), and chain coordinates.

With --node-id the node is dialed explicitly. Without it, fetch auto-discovers (#936): read the active set from CapacityBond, probe a random, region-first sample of candidates, and derive --provider-address from each candidate’s registry entry, striping across them (#1174).

§Errors

Interrupted on Ctrl-C, decdn_client::GaveUp once the stop policy’s no-progress limit passes, or the fault that ended the fetch.