Browse Source

lnpeer: return fw_info for all parts of a MPP in a trampoline onion

Due to an indendation error, fw_info was returned only for one
HTLC of the MPP. Thus, maybe_fulfill_htlc was called again with
the remaining HTLCs, which could possibly be failed due to MPP
timeout, resulting in fund loss for the forwarder.
master
ThomasV 2 years ago
parent
commit
0e43ef2792
  1. 1
      electrum/lnpeer.py

1
electrum/lnpeer.py

@ -2441,6 +2441,7 @@ class Peer(Logger):
# remove from list of payments, so that another attempt can be initiated # remove from list of payments, so that another attempt can be initiated
self.lnworker.final_onion_forwardings.remove(payment_key) self.lnworker.final_onion_forwardings.remove(payment_key)
asyncio.ensure_future(wrapped_callback()) asyncio.ensure_future(wrapped_callback())
# return fw_info so that maybe_fulfill_htlc will not be called again
fw_info = payment_key.hex() fw_info = payment_key.hex()
return None, fw_info, None return None, fw_info, None
else: else:

Loading…
Cancel
Save