small refactor
This commit is contained in:
parent
04ee2f786d
commit
7360015fa4
1 changed files with 2 additions and 3 deletions
|
@ -895,15 +895,13 @@ class LBRYumWallet(Wallet):
|
|||
|
||||
def _start(self):
|
||||
network_start_d = defer.Deferred()
|
||||
self.config = make_config(self._config)
|
||||
|
||||
def setup_network():
|
||||
self.config = make_config(self._config)
|
||||
self.network = Network(self.config)
|
||||
log.info("Loading the wallet")
|
||||
return defer.succeed(self.network.start())
|
||||
|
||||
d = setup_network()
|
||||
|
||||
def check_started():
|
||||
if self.network.is_connecting():
|
||||
if self._is_first_run():
|
||||
|
@ -919,6 +917,7 @@ class LBRYumWallet(Wallet):
|
|||
|
||||
self._start_check = task.LoopingCall(check_started)
|
||||
|
||||
d = setup_network()
|
||||
d.addCallback(lambda _: self._load_wallet())
|
||||
d.addCallback(self._save_wallet)
|
||||
d.addCallback(lambda _: self._start_check.start(.1))
|
||||
|
|
Loading…
Reference in a new issue