feeadjuster: no underscore in method name

cannot call methods from python framework with underscore in its name
6f924e63c2/contrib/pyln-client/pyln/client/lightning.py (L316)
This commit is contained in:
Gálli Zoltán
2021-01-17 15:35:24 +01:00
committed by Michael Schmoock
parent 75ddf53400
commit 7c8840266d

View File

@@ -206,17 +206,17 @@ def feeadjust(plugin: Plugin):
return msg
@plugin.method("feeadjuster_toggle")
def feeadjuster_toggle(plugin: Plugin, new_value: bool = None):
@plugin.method("feeadjustertoggle")
def feeadjustertoggle(plugin: Plugin, value: bool = None):
"""Activates/Deactivates automatic fee updates for forward events.
The status will be set to new_value.
The status will be set to value.
"""
msg = {"forward_event_subscription": {"previous": plugin.forward_event_subscription}}
if new_value is None:
if value is None:
plugin.forward_event_subscription = not plugin.forward_event_subscription
else:
plugin.forward_event_subscription = bool(new_value)
plugin.forward_event_subscription = bool(value)
msg["forward_event_subscription"]["current"] = plugin.forward_event_subscription
return msg