From 5541c1bec6ca5113328a295b6de0226fb2c74b7b Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 2 Oct 2016 12:15:51 +0200 Subject: [PATCH] check requires_split before upgrade --- lib/daemon.py | 5 ++++- lib/storage.py | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/daemon.py b/lib/daemon.py index d85327681..02c13c53f 100644 --- a/lib/daemon.py +++ b/lib/daemon.py @@ -187,8 +187,11 @@ class Daemon(DaemonThread): storage = WalletStorage(path) if not storage.file_exists: return - if storage.requires_split() or storage.requires_upgrade() or storage.get_action(): + if storage.requires_split() or storage.get_action(): return + if self.requires_upgrade(): + self.print_error('upgrading wallet format') + self.upgrade() wallet = Wallet(storage) wallet.start_threads(self.network) self.wallets[path] = wallet diff --git a/lib/storage.py b/lib/storage.py index f28415dee..21e392e01 100644 --- a/lib/storage.py +++ b/lib/storage.py @@ -60,9 +60,6 @@ class WalletStorage(PrintError): self.print_error("wallet path", self.path) if self.path: self.read(self.path) - if self.requires_upgrade(): - self.print_error('upgrading wallet format') - self.upgrade() # check here if I need to load a plugin t = self.get('wallet_type') l = plugin_loaders.get(t)