Skip to content
Snippets Groups Projects

refactor shard to use a simple vector

Merged STEVAN Antoine requested to merge refactor-shard into main
1 file
+ 13
6
Compare changes
  • Side-by-side
  • Inline
+ 13
6
@@ -149,12 +149,19 @@ mod tests {
.transpose()
.elements
.chunks(source_shards.height)
.map(|s| Shard {
k: k as u32,
linear_combination: vec![E::ScalarField::one()],
hash: hash.clone(),
bytes: s.to_vec(),
size: data.len(),
.enumerate()
.map(|(i, s)| {
let mut linear_combination = Vec::new();
linear_combination.resize(i + 1, E::ScalarField::zero());
linear_combination[i] = E::ScalarField::one();
Shard {
k: k as u32,
linear_combination,
hash: hash.clone(),
bytes: s.to_vec(),
size: data.len(),
}
})
.collect();
Loading