mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
contrib/pylightning: allow getpeer with log level.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
366d67ae6d
commit
be3b5f11e8
@@ -78,10 +78,13 @@ class LightningRpc(UnixDomainSocketRpc):
|
|||||||
between calls, but it does not (yet) support concurrent calls.
|
between calls, but it does not (yet) support concurrent calls.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def getpeer(self, peer_id):
|
def getpeer(self, peer_id, log_level=None):
|
||||||
"""Get info about a specific peer.
|
"""Get info about a specific peer, optionally with its log.
|
||||||
"""
|
"""
|
||||||
peers = self.getpeers()['peers']
|
if log_level:
|
||||||
|
peers = self.getpeers(log_level)['peers']
|
||||||
|
else:
|
||||||
|
peers = self.getpeers()['peers']
|
||||||
for p in peers:
|
for p in peers:
|
||||||
if p['peerid'] == peer_id:
|
if p['peerid'] == peer_id:
|
||||||
return p
|
return p
|
||||||
|
|||||||
Reference in New Issue
Block a user