subspace_data_retrieval::segment_fetcher

Function download_segment

source
pub async fn download_segment<PG>(
    segment_index: SegmentIndex,
    piece_getter: &PG,
    erasure_coding: ErasureCoding,
) -> Result<Segment, SegmentGetterError>
Expand description

Concurrently downloads the pieces for segment_index, and reconstructs the segment.