Skip to content
Snippets Groups Projects

Draft: Doc joss

Closed PERENNOU Tanguy requested to merge doc-joss into main
1 file
+ 22
0
Compare changes
  • Side-by-side
  • Inline
+ 22
0
@@ -445,6 +445,28 @@ pub fn decode<F: PrimeField>(shards: Vec<Shard<F>>) -> Result<Vec<u8>, KomodoErr
return Err(KomodoError::TooFewShards(np, k as usize));
}
// TODO: review code below, borrowed from recode_random()
for (i, (s1, s2)) in shards.iter().zip(shards.iter().skip(1)).enumerate() {
Please register or sign in to reply
if s1.k != s2.k {
return Err(KomodoError::IncompatibleShards(format!(
"k is not the same at {}: {} vs {}",
i, s1.k, s2.k
)));
}
if s1.hash != s2.hash {
return Err(KomodoError::IncompatibleShards(format!(
"hash is not the same at {}: {:?} vs {:?}",
i, s1.hash, s2.hash
)));
}
if s1.size != s2.size {
return Err(KomodoError::IncompatibleShards(format!(
"size is not the same at {}: {} vs {}",
i, s1.size, s2.size
)));
}
}
let encoding_mat = Matrix::from_vec_vec(
shards
.iter()
Loading