tadd list_peer command. (fix #6057) - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 27949cb0e557085f205035fa67ef57fd71f650ac DIR parent 99f933401a618e6b8e32b90314cf0c890213e631 HTML Author: ThomasV <thomasv@electrum.org> Date: Sun, 12 Apr 2020 12:48:44 +0200 add list_peer command. (fix #6057) Diffstat: M electrum/commands.py | 9 +++++++++ 1 file changed, 9 insertions(+), 0 deletions(-) --- DIR diff --git a/electrum/commands.py b/electrum/commands.py t@@ -969,6 +969,15 @@ class Commands: await wallet.lnworker.add_peer(connection_string) 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') async def open_channel(self, connection_string, amount, push_amount=0, password=None, wallet: Abstract_Wallet = None): funding_sat = satoshis(amount)