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:
@@ -16,9 +16,8 @@ def on_payment(payment, plugin, **kwargs):
|
||||
print("preimage={}".format(payment['preimage']))
|
||||
|
||||
if payment['preimage'].endswith('0'):
|
||||
# FIXME: Define this!
|
||||
WIRE_TEMPORARY_NODE_FAILURE = 0x2002
|
||||
return {'failure_code': WIRE_TEMPORARY_NODE_FAILURE}
|
||||
# WIRE_TEMPORARY_NODE_FAILURE = 0x2002
|
||||
return {'failure_message': "2002"}
|
||||
|
||||
return {'result': 'continue'}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user