pytest: Let fail_htlcs.py plugin generates TEMPORARY_NODE_FAILURE error

This commit is contained in:
trueptolemy
2019-09-05 22:43:07 +08:00
committed by ZmnSCPxj, ZmnSCPxj jxPCSmnZ
parent 22e8d242fc
commit a3a0f651e3
2 changed files with 13 additions and 5 deletions

View File

@@ -9,7 +9,9 @@ plugin = Plugin()
def on_htlc_accepted(onion, plugin, **kwargs):
plugin.log("Failing htlc on purpose")
plugin.log("onion: %r" % (onion))
return {"result": "fail", "failure_code": 16399}
# FIXME: Define this!
WIRE_TEMPORARY_NODE_FAILURE = 0x2002
return {"result": "fail", "failure_code": WIRE_TEMPORARY_NODE_FAILURE}
plugin.run()