mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
pytest: Add tests for htlc_accepted_hook
Two tests: one for failures and one for in-path resolution. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
2b81e02a2e
commit
9fd8be6463
13
tests/plugins/shortcircuit.py
Executable file
13
tests/plugins/shortcircuit.py
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from lightning import Plugin
|
||||
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
@plugin.hook("htlc_accepted")
|
||||
def on_htlc_accepted(onion, htlc, plugin):
|
||||
return {"result": "resolve", "payment_key": "00" * 32}
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user