MCPcopy Create free account
hub / github.com/ElementsProject/lightning / on_htlc_accepted

Function on_htlc_accepted

tests/plugins/fail_htlcs_invalid.py:9–17  ·  view source on GitHub ↗
(onion, plugin, **kwargs)

Source from the content-addressed store, hash-verified

7
8@plugin.hook("htlc_accepted")
9def 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
20plugin.run()

Callers

nothing calls this directly

Calls 1

logMethod · 0.80

Tested by

no test coverage detected