Modify send_can_decode to send to all nodes who haven't sent an `Echo`.

This commit is contained in:
pawanjay176 2019-05-22 13:49:00 +05:30
parent 85e8e97b0a
commit 047fa81864
1 changed files with 6 additions and 3 deletions

View File

@ -495,9 +495,12 @@ impl<N: NodeIdT> Broadcast<N> {
let mut step = Step::default();
for id in self.netinfo.all_ids() {
if let Some(EchoContent::Hash(_)) = self.echos.get(id) {
let msg = Target::Node(id.clone()).message(can_decode_msg.clone());
step.messages.push(msg);
match self.echos.get(id) {
Some(EchoContent::Hash(_)) | None => {
let msg = Target::Node(id.clone()).message(can_decode_msg.clone());
step.messages.push(msg);
}
_ => ()
}
}
let our_id = &self.our_id().clone();