mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
plugins: support failure_message in invoice and htlc_accepted hooks.
As promised in the Changelog when we converted from failcodes to messages internally. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -9,9 +9,8 @@ plugin = Plugin()
|
||||
def on_htlc_accepted(onion, plugin, **kwargs):
|
||||
plugin.log("Failing htlc on purpose")
|
||||
plugin.log("onion: %r" % (onion))
|
||||
# FIXME: Define this!
|
||||
WIRE_TEMPORARY_NODE_FAILURE = 0x2002
|
||||
return {"result": "fail", "failure_code": WIRE_TEMPORARY_NODE_FAILURE}
|
||||
# WIRE_TEMPORARY_NODE_FAILURE = 0x2002
|
||||
return {"result": "fail", "failure_message": "2002"}
|
||||
|
||||
|
||||
plugin.run()
|
||||
|
||||
Reference in New Issue
Block a user