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
3c624526
Commit
3c624526
authored
9 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug #231
parent
9dfff482
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cutecoin/core/graph.py
+1
-1
1 addition, 1 deletion
src/cutecoin/core/graph.py
src/cutecoin/core/registry/identity.py
+46
-37
46 additions, 37 deletions
src/cutecoin/core/registry/identity.py
with
47 additions
and
38 deletions
src/cutecoin/core/graph.py
+
1
−
1
View file @
3c624526
...
...
@@ -231,7 +231,7 @@ class Graph(object):
# Current validation can be negative if self.community.network.current_blockid.number
# is not refreshed yet
if
max_validation
>
current_validations
>
0
:
if
max_validation
>
current_validations
>
=
0
:
if
self
.
app
.
preferences
[
'
expert_mode
'
]:
arc
[
'
validation_text
'
]
=
"
{0}/{1}
"
.
format
(
current_validations
,
max_validation
)
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/core/registry/identity.py
+
46
−
37
View file @
3c624526
...
...
@@ -262,27 +262,32 @@ class Identity(QObject):
except
ValueError
as
e
:
if
'
404
'
in
str
(
e
):
logging
.
debug
(
'
bma.wot.CertifiersOf request error: {0}
'
.
format
(
str
(
e
)))
try
:
data
=
yield
from
community
.
bma_access
.
future_request
(
bma
.
wot
.
Lookup
,
{
'
search
'
:
self
.
pubkey
})
for
result
in
data
[
'
results
'
]:
if
result
[
"
pubkey
"
]
==
self
.
pubkey
:
for
uid_data
in
result
[
'
uids
'
]:
for
certifier_data
in
uid_data
[
'
others
'
]:
for
uid
in
certifier_data
[
'
uids
'
]:
# add a certifier
certifier
=
{}
certifier
[
'
identity
'
]
=
identities_registry
.
from_handled_data
(
uid
,
certifier_data
[
'
pubkey
'
],
BlockchainState
.
BUFFERED
,
community
)
block
=
yield
from
community
.
bma_access
.
future_request
(
bma
.
blockchain
.
Block
,
{
'
number
'
:
certifier_data
[
'
meta
'
][
'
block_number
'
]})
certifier
[
'
cert_time
'
]
=
block
[
'
medianTime
'
]
certifier
[
'
block_number
'
]
=
None
certifiers
.
append
(
certifier
)
except
ValueError
as
e
:
logging
.
debug
(
"
Lookup error : {0}
"
.
format
(
str
(
e
)))
except
NoPeerAvailable
as
e
:
logging
.
debug
(
str
(
e
))
try
:
data
=
yield
from
community
.
bma_access
.
future_request
(
bma
.
wot
.
Lookup
,
{
'
search
'
:
self
.
pubkey
})
for
result
in
data
[
'
results
'
]:
if
result
[
"
pubkey
"
]
==
self
.
pubkey
:
for
uid_data
in
result
[
'
uids
'
]:
for
certifier_data
in
uid_data
[
'
others
'
]:
for
uid
in
certifier_data
[
'
uids
'
]:
# add a certifier
certifier
=
{}
certifier
[
'
identity
'
]
=
identities_registry
.
\
from_handled_data
(
uid
,
certifier_data
[
'
pubkey
'
],
BlockchainState
.
BUFFERED
,
community
)
if
certifier
[
'
identity
'
]
not
in
certifiers
:
block
=
yield
from
community
.
bma_access
.
future_request
(
bma
.
blockchain
.
Block
,
{
'
number
'
:
certifier_data
[
'
meta
'
][
'
block_number
'
]})
certifier
[
'
cert_time
'
]
=
block
[
'
medianTime
'
]
certifier
[
'
block_number
'
]
=
None
certifiers
.
append
(
certifier
)
except
ValueError
as
e
:
logging
.
debug
(
"
Lookup error : {0}
"
.
format
(
str
(
e
)))
except
NoPeerAvailable
as
e
:
logging
.
debug
(
str
(
e
))
return
certifiers
...
...
@@ -333,22 +338,26 @@ class Identity(QObject):
except
ValueError
as
e
:
if
'
404
'
in
str
(
e
):
logging
.
debug
(
'
bma.wot.CertifiersOf request error
'
)
try
:
data
=
yield
from
community
.
bma_access
.
future_request
(
bma
.
wot
.
Lookup
,
{
'
search
'
:
self
.
pubkey
})
for
result
in
data
[
'
results
'
]:
if
result
[
"
pubkey
"
]
==
self
.
pubkey
:
for
certified_data
in
result
[
'
signed
'
]:
certified
=
{}
certified
[
'
identity
'
]
=
identities_registry
.
from_handled_data
(
certified_data
[
'
uid
'
],
certified_data
[
'
pubkey
'
],
BlockchainState
.
BUFFERED
,
community
)
certified
[
'
cert_time
'
]
=
certified_data
[
'
meta
'
][
'
timestamp
'
]
certified
[
'
block_number
'
]
=
None
certified_list
.
append
(
certified
)
except
ValueError
as
e
:
if
'
404
'
in
str
(
e
):
logging
.
debug
(
'
bma.wot.Lookup request error
'
)
except
NoPeerAvailable
as
e
:
logging
.
debug
(
str
(
e
))
try
:
data
=
yield
from
community
.
bma_access
.
future_request
(
bma
.
wot
.
Lookup
,
{
'
search
'
:
self
.
pubkey
})
for
result
in
data
[
'
results
'
]:
if
result
[
"
pubkey
"
]
==
self
.
pubkey
:
for
certified_data
in
result
[
'
signed
'
]:
certified
=
{}
certified
[
'
identity
'
]
=
identities_registry
.
from_handled_data
(
certified_data
[
'
uid
'
],
certified_data
[
'
pubkey
'
],
BlockchainState
.
BUFFERED
,
community
)
if
certified
[
'
identity
'
]
not
in
certified_list
:
certified
[
'
cert_time
'
]
=
certified_data
[
'
meta
'
][
'
timestamp
'
]
certified
[
'
block_number
'
]
=
None
certified_list
.
append
(
certified
)
except
ValueError
as
e
:
if
'
404
'
in
str
(
e
):
logging
.
debug
(
'
bma.wot.Lookup request error
'
)
except
NoPeerAvailable
as
e
:
logging
.
debug
(
str
(
e
))
return
certified_list
...
...
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