show when the wallet is starting/started

This commit is contained in:
Jimmy Kiselak 2016-02-22 23:31:07 -05:00
parent b419b8f642
commit 671e6da104

View file

@ -835,6 +835,7 @@ class LBRYumWallet(LBRYWallet):
self.wallet = None
self.cmd_runner = None
self.first_run = False
self.printed_retrieving_headers = False
def _start(self):
@ -843,15 +844,20 @@ class LBRYumWallet(LBRYWallet):
def setup_network():
self.config = SimpleConfig()
self.network = Network(self.config)
alert.info("Starting the wallet...")
return defer.succeed(self.network.start())
d = setup_network()
def check_started():
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
start_check.stop()
if self.network.is_connected():
alert.info("Wallet started.")
network_start_d.callback(True)
else:
network_start_d.errback(ValueError("Failed to connect to network."))