mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
9fd8be6463
Two tests: one for failures and one for in-path resolution. Signed-off-by: Christian Decker <decker.christian@gmail.com>
16 lines
295 B
Python
Executable File
16 lines
295 B
Python
Executable File
#!/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()
|