paytest: Fix issue with payments destined for the current node

See previous commit for details.
This commit is contained in:
Christian Decker
2021-03-25 14:43:58 +01:00
committed by Michael Schmoock
parent fb77c4989b
commit efd1b7e86a
2 changed files with 1 additions and 2 deletions

View File

@@ -246,7 +246,7 @@ def on_htlc_accepted(onion, htlc, request, plugin, *args, **kwargs):
)
)
# If this is not a test payment, pass it on
if onion["short_channel_id"] != "1x1x1":
if 'short_channel_id' not in onion or onion["short_channel_id"] != "1x1x1":
return request.set_result({"result": "continue"})
# Decode the onion so we get the details the virtual recipient