mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
pyln-testing: add 'config' method to a node
Query for a config's value. If not set, returns 'none'
This commit is contained in:
committed by
Christian Decker
parent
327d9a3ff6
commit
3c1d90086f
@@ -1043,6 +1043,13 @@ class LightningNode(object):
|
|||||||
out = out[2 + length:]
|
out = out[2 + length:]
|
||||||
return msgs
|
return msgs
|
||||||
|
|
||||||
|
def config(self, config_name):
|
||||||
|
try:
|
||||||
|
opt = self.rpc.listconfigs(config_name)
|
||||||
|
return opt[config_name]
|
||||||
|
except RpcError:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
class Throttler(object):
|
class Throttler(object):
|
||||||
"""Throttles the creation of system-processes to avoid overload.
|
"""Throttles the creation of system-processes to avoid overload.
|
||||||
|
|||||||
Reference in New Issue
Block a user