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
6e7763bd
Commit
6e7763bd
authored
9 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fix lookup not called when looking for identies
parent
55abaa0b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cutecoin/core/registry/identities.py
+4
-7
4 additions, 7 deletions
src/cutecoin/core/registry/identities.py
src/cutecoin/gui/identities_tab.py
+1
-1
1 addition, 1 deletion
src/cutecoin/gui/identities_tab.py
src/cutecoin/gui/transactions_tab.py
+2
-0
2 additions, 0 deletions
src/cutecoin/gui/transactions_tab.py
with
7 additions
and
8 deletions
src/cutecoin/core/registry/identities.py
+
4
−
7
View file @
6e7763bd
...
...
@@ -47,8 +47,7 @@ class IdentitiesRegistry:
@asyncio.coroutine
def
future_find
(
self
,
pubkey
,
community
):
def
lookup
():
identity
=
Identity
.
empty
(
pubkey
)
self
.
_instances
[
pubkey
]
=
identity
nonlocal
identity
lookup_tries
=
0
while
lookup_tries
<
3
:
try
:
...
...
@@ -67,7 +66,6 @@ class IdentitiesRegistry:
identity
.
blockchain_state
=
BlockchainState
.
BUFFERED
identity
.
local_state
=
LocalState
.
PARTIAL
logging
.
debug
(
"
Lookup : found {0}
"
.
format
(
identity
))
return
identity
except
ValueError
as
e
:
lookup_tries
+=
1
except
asyncio
.
TimeoutError
:
...
...
@@ -75,8 +73,7 @@ class IdentitiesRegistry:
except
ClientError
:
lookup_tries
+=
1
except
NoPeerAvailable
:
return
identity
return
identity
pass
if
pubkey
in
self
.
_instances
:
identity
=
self
.
_instances
[
pubkey
]
...
...
@@ -92,8 +89,8 @@ class IdentitiesRegistry:
identity
.
blockchain_state
=
BlockchainState
.
VALIDATED
return
identity
except
ValueError
as
e
:
if
'
404
'
in
str
(
e
):
return
(
yield
from
lookup
()
)
if
'
404
'
in
str
(
e
)
or
'
400
'
in
str
(
e
):
yield
from
lookup
()
else
:
tries
+=
1
except
asyncio
.
TimeoutError
:
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/identities_tab.py
+
1
−
1
View file @
6e7763bd
...
...
@@ -222,6 +222,7 @@ class IdentitiesTabWidget(QWidget, Ui_IdentitiesTab):
if
self
.
account
and
self
.
community
:
try
:
self
.
busy
.
show
()
self
.
refresh_identities
([])
self_identity
=
yield
from
self
.
account
.
identity
(
self
.
community
)
account_connections
=
[]
certs_of
=
yield
from
self_identity
.
unique_valid_certifiers_of
(
self
.
app
.
identities_registry
,
self
.
community
)
...
...
@@ -238,7 +239,6 @@ class IdentitiesTabWidget(QWidget, Ui_IdentitiesTab):
except
NoPeerAvailable
:
pass
finally
:
self
.
refresh_identities
([])
self
.
busy
.
hide
()
@once_at_a_time
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/transactions_tab.py
+
2
−
0
View file @
6e7763bd
...
...
@@ -98,6 +98,8 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget):
self
.
date_to
.
setMaximumDateTime
(
tomorrow_datetime
)
except
NoPeerAvailable
as
e
:
logging
.
debug
(
str
(
e
))
except
ValueError
as
e
:
logging
.
debug
(
str
(
e
))
def
refresh
(
self
):
#TODO: Use resetmodel instead of destroy/create
...
...
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