check requires_split before upgrade
This commit is contained in:
parent
4788a10a8b
commit
5541c1bec6
|
@ -187,8 +187,11 @@ class Daemon(DaemonThread):
|
||||||
storage = WalletStorage(path)
|
storage = WalletStorage(path)
|
||||||
if not storage.file_exists:
|
if not storage.file_exists:
|
||||||
return
|
return
|
||||||
if storage.requires_split() or storage.requires_upgrade() or storage.get_action():
|
if storage.requires_split() or storage.get_action():
|
||||||
return
|
return
|
||||||
|
if self.requires_upgrade():
|
||||||
|
self.print_error('upgrading wallet format')
|
||||||
|
self.upgrade()
|
||||||
wallet = Wallet(storage)
|
wallet = Wallet(storage)
|
||||||
wallet.start_threads(self.network)
|
wallet.start_threads(self.network)
|
||||||
self.wallets[path] = wallet
|
self.wallets[path] = wallet
|
||||||
|
|
|
@ -60,9 +60,6 @@ class WalletStorage(PrintError):
|
||||||
self.print_error("wallet path", self.path)
|
self.print_error("wallet path", self.path)
|
||||||
if self.path:
|
if self.path:
|
||||||
self.read(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
|
# check here if I need to load a plugin
|
||||||
t = self.get('wallet_type')
|
t = self.get('wallet_type')
|
||||||
l = plugin_loaders.get(t)
|
l = plugin_loaders.get(t)
|
||||||
|
|
Loading…
Reference in New Issue