Function polkadot_erasure_coding::reconstruct
source · pub fn reconstruct<'a, I, T: Decode>(
n_validators: usize,
chunks: I,
) -> Result<T, Error>
Expand description
Reconstruct decodable data from a set of chunks.
Provide an iterator containing chunk data and the corresponding index. The indices of the present chunks must be indicated. If too few chunks are provided, recovery is not possible.
Works only up to 65536 validators, and n_validators
must be non-zero.