Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
7b498101
Commit
7b498101
authored
9 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Broadcast to 6 random nodes instead of all nodes
parent
543ff576
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sakia/core/net/api/bma/access.py
+2
-2
2 additions, 2 deletions
src/sakia/core/net/api/bma/access.py
src/sakia/gui/certification.py
+0
-1
0 additions, 1 deletion
src/sakia/gui/certification.py
with
2 additions
and
3 deletions
src/sakia/core/net/api/bma/access.py
+
2
−
2
View file @
7b498101
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
src/sakia/gui/certification.py
+
0
−
1
View file @
7b498101
...
...
@@ -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
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment