Fix Gossip skipping push for some values (#4463)

* Make gossip skip over values from Pruned nodes

* Add test and init blooms to contain the origin
This commit is contained in:
Sagar Dhawan
2019-05-28 18:39:40 -07:00
committed by GitHub
parent a7ef409c2b
commit 335dfdc4d5
4 changed files with 59 additions and 40 deletions

View File

@ -171,12 +171,12 @@ fn network_run_push(network: &mut Network, start: usize, end: usize) -> (usize,
.collect();
let transfered: Vec<_> = requests
.into_par_iter()
.map(|(from, peers, msgs)| {
.map(|(from, push_messages)| {
let mut bytes: usize = 0;
let mut delivered: usize = 0;
let mut num_msgs: usize = 0;
let mut prunes: usize = 0;
for to in peers {
for (to, msgs) in push_messages {
bytes += serialized_size(&msgs).unwrap() as usize;
num_msgs += 1;
let rsps = network