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
f16ffb40
Commit
f16ffb40
authored
10 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fixing bug when lloading a new account
parent
490cb9dc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cutecoin/core/community.py
+4
-5
4 additions, 5 deletions
src/cutecoin/core/community.py
with
4 additions
and
5 deletions
src/cutecoin/core/community.py
+
4
−
5
View file @
f16ffb40
...
@@ -62,6 +62,8 @@ class Cache():
...
@@ -62,6 +62,8 @@ class Cache():
Refreshing the cache just clears every last requests which
Refreshing the cache just clears every last requests which
cannot be saved because they can change from one block to another.
cannot be saved because they can change from one block to another.
'''
'''
logging
.
debug
(
"
Refresh : {0}/{1}
"
.
format
(
self
.
latest_block
,
self
.
community
.
network
.
latest_block
))
if
self
.
latest_block
<
self
.
community
.
network
.
latest_block
:
if
self
.
latest_block
<
self
.
community
.
network
.
latest_block
:
self
.
latest_block
=
self
.
community
.
network
.
latest_block
self
.
latest_block
=
self
.
community
.
network
.
latest_block
self
.
data
=
{
k
:
self
.
data
[
k
]
for
k
in
self
.
data
.
keys
()
self
.
data
=
{
k
:
self
.
data
[
k
]
for
k
in
self
.
data
.
keys
()
...
@@ -86,10 +88,6 @@ class Cache():
...
@@ -86,10 +88,6 @@ class Cache():
result
=
self
.
community
.
request
(
request
,
req_args
,
get_args
,
result
=
self
.
community
.
request
(
request
,
req_args
,
get_args
,
cached
=
False
)
cached
=
False
)
# Do not cache block 0
if
self
.
latest_block
==
0
:
return
result
else
:
self
.
data
[
cache_key
]
=
result
self
.
data
[
cache_key
]
=
result
return
self
.
data
[
cache_key
]
return
self
.
data
[
cache_key
]
else
:
else
:
...
@@ -371,6 +369,7 @@ class Community(QObject):
...
@@ -371,6 +369,7 @@ class Community(QObject):
'''
'''
Start the refresh processing of the cache
Start the refresh processing of the cache
'''
'''
# We have to refresh node before refresh cache
self
.
_cache
.
refresh
()
self
.
_cache
.
refresh
()
def
request
(
self
,
request
,
req_args
=
{},
get_args
=
{},
cached
=
True
):
def
request
(
self
,
request
,
req_args
=
{},
get_args
=
{},
cached
=
True
):
...
...
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