mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 09:45:18 +00:00
add list_peer command. (fix #6057)
This commit is contained in:
parent
99f933401a
commit
27949cb0e5
1 changed files with 9 additions and 0 deletions
|
@ -969,6 +969,15 @@ class Commands:
|
||||||
await wallet.lnworker.add_peer(connection_string)
|
await wallet.lnworker.add_peer(connection_string)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@command('wn')
|
||||||
|
async def list_peers(self, wallet: Abstract_Wallet = None):
|
||||||
|
return [{
|
||||||
|
'node_id':p.pubkey.hex(),
|
||||||
|
'address':p.transport.name(),
|
||||||
|
'initialized':p.is_initialized(),
|
||||||
|
'channels': [c.funding_outpoint.to_str() for c in p.channels.values()],
|
||||||
|
} for p in wallet.lnworker.peers.values()]
|
||||||
|
|
||||||
@command('wpn')
|
@command('wpn')
|
||||||
async def open_channel(self, connection_string, amount, push_amount=0, password=None, wallet: Abstract_Wallet = None):
|
async def open_channel(self, connection_string, amount, push_amount=0, password=None, wallet: Abstract_Wallet = None):
|
||||||
funding_sat = satoshis(amount)
|
funding_sat = satoshis(amount)
|
||||||
|
|
Loading…
Add table
Reference in a new issue