Skip to content

Commit

Permalink
Fix lucky broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
grimadas committed Sep 20, 2023
1 parent e794c4d commit a30007a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bami/broadcast/community.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def lucky_broadcast(self, message_payload, num_nodes=None):
"""Broadcast message to all peers and return the awaited id for acknowledgement"""
sample_size = num_nodes if num_nodes else self.settings.sync_retry_nodes
lucky_peers = random.sample(self.get_full_nodes(), sample_size)
self.ez_send(lucky_peers, message_payload)
for peer in lucky_peers:
self.ez_send(peer, message_payload)

@lazy_wrapper(TxBatchPayload)
def receive_new_batch(self, p: Peer, batch: TxBatchPayload):
Expand Down

0 comments on commit a30007a

Please sign in to comment.