mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
pytest: test that we maintain load order unless hook deps require a change.
Suggested-by: @mschmook Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
852e14c947
commit
d429e21db3
15
tests/plugins/dep_d.py
Executable file
15
tests/plugins/dep_d.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
from pyln.client import Plugin
|
||||
|
||||
"""A simple plugin that must come before dep_e.
|
||||
"""
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
@plugin.hook('htlc_accepted', before=['dep_e.py'])
|
||||
def on_htlc_accepted(htlc, plugin, **kwargs):
|
||||
print("htlc_accepted called")
|
||||
return {'result': 'continue'}
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user