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
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
88ee0d16
Commit
88ee0d16
authored
10 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
Wot view : implement arc color and expiration date using currency params
todo: implement signature function
parent
cbfc3f0a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cutecoin/core/community.py
+3
-0
3 additions, 0 deletions
src/cutecoin/core/community.py
src/cutecoin/wot/qt/form.py
+4
-4
4 additions, 4 deletions
src/cutecoin/wot/qt/form.py
with
7 additions
and
4 deletions
src/cutecoin/core/community.py
+
3
−
0
View file @
88ee0d16
...
...
@@ -126,3 +126,6 @@ class Community(object):
data
=
{
'
currency
'
:
self
.
currency
,
'
peers
'
:
self
.
jsonify_peers_list
()}
return
data
def
get_parameters
(
self
):
return
self
.
request
(
bma
.
blockchain
.
Parameters
)
This diff is collapsed.
Click to expand it.
src/cutecoin/wot/qt/form.py
+
4
−
4
View file @
88ee0d16
...
...
@@ -33,10 +33,12 @@ class Form(QWidget, Ui_Form):
self
.
account
=
account
self
.
community
=
community
# nodes list for menu from search
self
.
nodes
=
list
()
self
.
signature_validity
=
86400
*
365
self
.
ARC_STATUS_STRONG_time
=
self
.
signature_validity
-
(
86400
*
165
)
self
.
signature_validity
=
self
.
community
.
get_parameters
()[
'
sigValidity
'
]
# arc considered strong during 75% of signature validity time
self
.
ARC_STATUS_STRONG_time
=
int
(
self
.
signature_validity
*
0.75
)
self
.
draw_graph
(
self
.
account
.
pubkey
)
def
draw_graph
(
self
,
public_key
):
...
...
@@ -54,7 +56,6 @@ class Form(QWidget, Ui_Form):
graph
[
public_key
]
=
{
'
arcs
'
:
[],
'
text
'
:
certifiers
[
'
uid
'
],
'
tooltip
'
:
public_key
,
'
status
'
:
node_status
}
# add certifiers of uid
#for certifier in self.community.request(mapi.get_sig_to(public_key):
for
certifier
in
certifiers
[
'
certifications
'
]:
if
(
time
.
time
()
-
certifier
[
'
cert_time
'
][
'
medianTime
'
])
>
self
.
ARC_STATUS_STRONG_time
:
arc_status
=
ARC_STATUS_WEAK
...
...
@@ -77,7 +78,6 @@ class Form(QWidget, Ui_Form):
}
# add certified by uid
#for certified in mapi.get_sig_from(public_key):
for
certified
in
self
.
community
.
request
(
bma
.
wot
.
CertifiedBy
,
{
'
search
'
:
public_key
})[
'
certifications
'
]:
if
(
time
.
time
()
-
certified
[
'
cert_time
'
][
'
medianTime
'
])
>
self
.
ARC_STATUS_STRONG_time
:
arc_status
=
ARC_STATUS_WEAK
...
...
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