-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pytest: test that we maintain load order unless hook deps require a c…
…hange. Suggested-by: @mschmook Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information
1 parent
83713d3
commit ece24e5
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env python3 | ||
from pyln.client import Plugin | ||
|
||
"""A simple plugin that registers an htlc_accepted hook.. | ||
""" | ||
plugin = Plugin() | ||
|
||
|
||
@plugin.hook('htlc_accepted') | ||
def on_htlc_accepted(htlc, plugin, **kwargs): | ||
print("htlc_accepted called") | ||
return {'result': 'continue'} | ||
|
||
|
||
plugin.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters