Use sendmmsg for broadcasting shreds (#6325)

* Replace packet with slice of data in sendmmsg

* fixes

* fix bench
This commit is contained in:
Pankaj Garg
2019-10-10 19:38:48 -07:00
committed by GitHub
parent fa64a0b367
commit 364781366a
5 changed files with 49 additions and 49 deletions

View File

@ -32,8 +32,9 @@ fn broadcast_shreds_bench(bencher: &mut Bencher) {
stakes.insert(id, thread_rng().gen_range(1, NUM_PEERS) as u64);
}
bencher.iter(move || {
let shreds = shreds.clone();
cluster_info
.broadcast_shreds(&socket, &shreds, &seeds, Some(&stakes))
.broadcast_shreds(&socket, shreds, &seeds, Some(&stakes))
.unwrap();
});
}