forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pytest: Reproduce waitblockheight timeout issue ElementsProject#4309
- Loading branch information
Showing
2 changed files
with
41 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,22 @@ | ||
#!/usr/bin/env python3 | ||
"""Simple plugin to cause a waitblockheight that times out. | ||
We report an error with a future blockheight, which causes the sender | ||
to wait, and ultimately retry, excluding us because we misbehaved. | ||
""" | ||
|
||
|
||
from pyln.client import Plugin | ||
plugin = Plugin() | ||
|
||
|
||
@plugin.hook('htlc_accepted') | ||
def on_htlc_accepted(onion, htlc, **kwargs): | ||
return { | ||
'result': "fail", | ||
"failure_message": "400f00000000000000007fffffff", # Bogus error with INT32_MAX as blockheight | ||
} | ||
|
||
|
||
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