(onion, plugin, **kwargs)
| 7 | |
| 8 | @plugin.hook("htlc_accepted") |
| 9 | def on_htlc_accepted(onion, plugin, **kwargs): |
| 10 | plugin.log("Failing htlc on purpose with invalid onion failure") |
| 11 | plugin.log("onion: %r" % (onion)) |
| 12 | # WIRE_TEMPORARY_CHANNEL_FAILURE = 0x1007 |
| 13 | # This failure code should be followed by a |
| 14 | # `channel_update`; we deliberately return |
| 15 | # a 0-length `channel_update` to trigger |
| 16 | # issue #3757 reported by @sumBTC. |
| 17 | return {"result": "fail", "failure_message": "10070000"} |
| 18 | |
| 19 | |
| 20 | plugin.run() |