show when the wallet is starting/started
This commit is contained in:
parent
b419b8f642
commit
671e6da104
1 changed files with 6 additions and 0 deletions
|
@ -835,6 +835,7 @@ class LBRYumWallet(LBRYWallet):
|
||||||
self.wallet = None
|
self.wallet = None
|
||||||
self.cmd_runner = None
|
self.cmd_runner = None
|
||||||
self.first_run = False
|
self.first_run = False
|
||||||
|
self.printed_retrieving_headers = False
|
||||||
|
|
||||||
def _start(self):
|
def _start(self):
|
||||||
|
|
||||||
|
@ -843,15 +844,20 @@ class LBRYumWallet(LBRYWallet):
|
||||||
def setup_network():
|
def setup_network():
|
||||||
self.config = SimpleConfig()
|
self.config = SimpleConfig()
|
||||||
self.network = Network(self.config)
|
self.network = Network(self.config)
|
||||||
|
alert.info("Starting the wallet...")
|
||||||
return defer.succeed(self.network.start())
|
return defer.succeed(self.network.start())
|
||||||
|
|
||||||
d = setup_network()
|
d = setup_network()
|
||||||
|
|
||||||
def check_started():
|
def check_started():
|
||||||
if self.network.is_connecting():
|
if self.network.is_connecting():
|
||||||
|
if not self.printed_retrieving_headers and self.network.blockchain.retrieving_headers:
|
||||||
|
alert.info("Running the wallet for the first time...this may take a moment.")
|
||||||
|
self.printed_retrieving_headers = True
|
||||||
return False
|
return False
|
||||||
start_check.stop()
|
start_check.stop()
|
||||||
if self.network.is_connected():
|
if self.network.is_connected():
|
||||||
|
alert.info("Wallet started.")
|
||||||
network_start_d.callback(True)
|
network_start_d.callback(True)
|
||||||
else:
|
else:
|
||||||
network_start_d.errback(ValueError("Failed to connect to network."))
|
network_start_d.errback(ValueError("Failed to connect to network."))
|
||||||
|
|
Loading…
Reference in a new issue