Skip to content
Snippets Groups Projects
Commit 7b498101 authored by inso's avatar inso
Browse files

Broadcast to 6 random nodes instead of all nodes

parent 543ff576
No related branches found
No related tags found
No related merge requests found
......@@ -297,10 +297,10 @@ class BmaAccess(QObject):
.. note:: If one node accept the requests (returns 200),
the broadcast should be considered accepted by the network.
"""
nodes = self._network.online_nodes
nodes = self._network.synced_nodes
replies = []
if len(nodes) > 0:
for node in nodes:
for node in random.sample(nodes, 6):
logging.debug("Trying to connect to : " + node.pubkey)
conn_handler = node.endpoint.conn_handler()
req = request(conn_handler, **req_args)
......
......@@ -149,7 +149,6 @@ class CertificationDialog(QObject):
:rtype: str
"""
pubkey = None
self.ui.button_box.setEnabled(False)
if self.ui.radio_contact.isChecked():
for contact in self.account.contacts:
if contact['name'] == self.ui.combo_contact.currentText():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment