network: initial status should be 'unknown', distinct from 'connecting'
This commit is contained in:
2
electrum
2
electrum
@@ -304,7 +304,7 @@ def run_cmdline(config):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
network = NetworkProxy(s, config)
|
network = NetworkProxy(s, config)
|
||||||
network.start()
|
network.start()
|
||||||
while network.is_connecting():
|
while network.status == 'unknown':
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
if not network.is_connected():
|
if not network.is_connected():
|
||||||
print_msg("daemon is not connected")
|
print_msg("daemon is not connected")
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class NetworkProxy(util.DaemonThread):
|
|||||||
self.pipe.get_queue.put({'method':'network.status', 'params':[key, value]})
|
self.pipe.get_queue.put({'method':'network.status', 'params':[key, value]})
|
||||||
|
|
||||||
# status variables
|
# status variables
|
||||||
self.status = 'connecting'
|
self.status = 'unknown'
|
||||||
self.servers = {}
|
self.servers = {}
|
||||||
self.banner = ''
|
self.banner = ''
|
||||||
self.blockchain_height = 0
|
self.blockchain_height = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user