mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-05 21:44:42 +01:00
16 lines
295 B
Python
16 lines
295 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
from lightning import Plugin
|
||
|
|
||
|
plugin = Plugin()
|
||
|
|
||
|
|
||
|
@plugin.hook("htlc_accepted")
|
||
|
def on_htlc_accepted(htlc, onion, plugin):
|
||
|
plugin.log("Failing htlc on purpose")
|
||
|
plugin.log("onion: %r" % (onion))
|
||
|
return {"result": "fail", "failure_code": 16399}
|
||
|
|
||
|
|
||
|
plugin.run()
|