-
Notifications
You must be signed in to change notification settings - Fork 912
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: test that we only use tlv onion when advertized.
Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information
1 parent
f117685
commit 82a38a1
Showing
2 changed files
with
85 additions
and
1 deletion.
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,19 @@ | ||
#!/usr/bin/env python3 | ||
"""Plugin that prints out HTLC onions. | ||
We use this to check whether they're TLV or not | ||
""" | ||
|
||
from lightning import Plugin | ||
|
||
plugin = Plugin() | ||
|
||
|
||
@plugin.hook("htlc_accepted") | ||
def on_htlc_accepted(htlc, onion, plugin, **kwargs): | ||
plugin.log("Got onion {}".format(onion)) | ||
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