From 5d08fa7ab59a2b4fcdc98f348a1790b7c6d1bcc1 Mon Sep 17 00:00:00 2001 From: Inso <insomniak.fr@gmail.com> Date: Sat, 3 Jan 2015 15:44:56 +0100 Subject: [PATCH] Fixed a bug when cache loading didn't refresh at startup --- src/cutecoin/core/app.py | 2 ++ src/cutecoin/gui/currency_tab.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cutecoin/core/app.py b/src/cutecoin/core/app.py index 16aa74b8..386693d1 100644 --- a/src/cutecoin/core/app.py +++ b/src/cutecoin/core/app.py @@ -97,6 +97,8 @@ class Application(object): json_data = open(wallet_path, 'r') data = json.load(json_data) wallet.cache.load_from_json(data) + for community in account.communities: + wallet.cache.refresh(community) def save(self, account): with open(config.parameters['data'], 'w') as outfile: diff --git a/src/cutecoin/gui/currency_tab.py b/src/cutecoin/gui/currency_tab.py index 966f32e3..585d4fbf 100644 --- a/src/cutecoin/gui/currency_tab.py +++ b/src/cutecoin/gui/currency_tab.py @@ -36,7 +36,7 @@ class BlockchainWatcher(QObject): for w in self.account.wallets: w.cache.refresh(self.community) - logging.debug("New block, {0} mined in {1}".format(self.last_block, + logging.debug("New block, {0} mined in {1}".format(current_block['number'], self.community.currency)) self.new_block_mined.emit(current_block['number']) self.last_block = current_block['number'] -- GitLab