|
@ -100,6 +100,7 @@ class Daemon(DaemonThread): |
|
|
if sub == 'start': |
|
|
if sub == 'start': |
|
|
response = "Daemon already running" |
|
|
response = "Daemon already running" |
|
|
elif sub == 'status': |
|
|
elif sub == 'status': |
|
|
|
|
|
if self.network: |
|
|
p = self.network.get_parameters() |
|
|
p = self.network.get_parameters() |
|
|
response = { |
|
|
response = { |
|
|
'path': self.network.config.path, |
|
|
'path': self.network.config.path, |
|
@ -109,8 +110,11 @@ class Daemon(DaemonThread): |
|
|
'nodes': self.network.get_interfaces(), |
|
|
'nodes': self.network.get_interfaces(), |
|
|
'connected': self.network.is_connected(), |
|
|
'connected': self.network.is_connected(), |
|
|
'auto_connect': p[4], |
|
|
'auto_connect': p[4], |
|
|
'wallets': dict([ (k, w.is_up_to_date()) for k, w in self.wallets.items()]), |
|
|
'wallets': {k: w.is_up_to_date() |
|
|
|
|
|
for k, w in self.wallets.items()}, |
|
|
} |
|
|
} |
|
|
|
|
|
else: |
|
|
|
|
|
response = "Daemon offline" |
|
|
elif sub == 'stop': |
|
|
elif sub == 'stop': |
|
|
self.stop() |
|
|
self.stop() |
|
|
response = "Daemon stopped" |
|
|
response = "Daemon stopped" |
|
|