Files
palladum-lightning/tests/plugins/no_fail.py
Lagrang3 16d00e09ef renepay: bug fix, local channel information
Listpeerchannels would update the local channel information setting the
liquidity in the outgoing channel to known_min=known_max=capacity,
when in fact it should be known_min=known_max=spendable.
2024-05-08 22:32:13 -05:00

29 lines
522 B
Python
Executable File

#!/usr/bin/env python3
"""Plugin that breaks the node if a fail notification is received.
"""
from pyln.client import Plugin, RpcError
import os
plugin = Plugin()
@plugin.init()
def init(plugin, options, configuration):
plugin.log("no_fail initialized")
@plugin.subscribe("sendpay_failure")
def channel_opened(plugin, sendpay_failure, **kwargs):
os._exit(1)
@plugin.method("nofail")
def nofail(plugin):
"""Checks that the plugin is still running.
"""
return {"status": "active"}
plugin.run()