subspace_data_retrieval::segment_downloading

Function download_segment

Source
pub async fn download_segment<PG>(
    segment_index: SegmentIndex,
    piece_getter: &PG,
    erasure_coding: ErasureCoding,
) -> Result<Segment, SegmentDownloadingError>
where PG: PieceGetter,
Expand description

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