Reduce serializations/deserializations of shreds (#5879)

This commit is contained in:
Pankaj Garg
2019-09-12 10:10:25 -07:00
committed by GitHub
parent 176c7d8b13
commit 385086359c
4 changed files with 124 additions and 119 deletions

View File

@@ -302,11 +302,7 @@ mod test {
bincode::serialize_into(&mut shredder, &entries)
.expect("Expect to write all entries to shreds");
shredder.finalize_slot();
shredder
.shreds
.iter()
.map(|s| bincode::deserialize(s).unwrap())
.collect()
shredder.shred_tuples.into_iter().map(|(s, _)| s).collect()
}
#[test]