Avoid cloning Vec<Entry> when calling entries_to_test_shreds() (#22093)

This commit is contained in:
Yueh-Hsuan Chiang
2021-12-24 12:32:43 -08:00
committed by GitHub
parent 2ab4f34c02
commit b89cd8cd1a
9 changed files with 42 additions and 48 deletions

View File

@@ -1819,7 +1819,7 @@ mod tests {
info!("creating shreds");
let mut last_print = Instant::now();
for i in 1..10 {
let shreds = blockstore::entries_to_test_shreds(entries.clone(), i, i - 1, true, 1);
let shreds = blockstore::entries_to_test_shreds(&entries, i, i - 1, true, 1);
blockstore.insert_shreds(shreds, None, true).unwrap();
if last_print.elapsed().as_millis() > 5000 {
info!("inserted {}", i);