add connected
server to wallet status
This commit is contained in:
parent
b34f44c867
commit
0315eaff8a
2 changed files with 7 additions and 0 deletions
|
@ -112,7 +112,13 @@ class WalletComponent(Component):
|
|||
return
|
||||
session_pool = self.wallet_manager.ledger.network.session_pool
|
||||
sessions = session_pool.sessions
|
||||
connected = None
|
||||
if self.wallet_manager.ledger.network.client:
|
||||
addr_and_port = self.wallet_manager.ledger.network.client.server_address_and_port
|
||||
if addr_and_port:
|
||||
connected = f"{addr_and_port[0]}:{addr_and_port[1]}"
|
||||
result = {
|
||||
'connected': connected,
|
||||
'servers': [
|
||||
{
|
||||
'host': session.server[0],
|
||||
|
|
|
@ -772,6 +772,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
|||
'download_progress': (float) 0-100.0
|
||||
},
|
||||
'wallet': {
|
||||
'connected': (str) host and port of the connected spv server,
|
||||
'blocks': (int) local blockchain height,
|
||||
'blocks_behind': (int) remote_height - local_height,
|
||||
'best_blockhash': (str) block hash of most recent block,
|
||||
|
|
Loading…
Reference in a new issue