Skip to content

Commit

Permalink
Modify send_can_decode to send to all nodes who haven't sent an Echo.
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanjay176 committed May 22, 2019
1 parent 529894d commit 19fd916
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/broadcast/broadcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 19fd916

Please sign in to comment.