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.
This commit is contained in:
@@ -2441,8 +2441,9 @@ class Peer(Logger):
|
||||
# remove from list of payments, so that another attempt can be initiated
|
||||
self.lnworker.final_onion_forwardings.remove(payment_key)
|
||||
asyncio.ensure_future(wrapped_callback())
|
||||
fw_info = payment_key.hex()
|
||||
return None, fw_info, None
|
||||
# return fw_info so that maybe_fulfill_htlc will not be called again
|
||||
fw_info = payment_key.hex()
|
||||
return None, fw_info, None
|
||||
else:
|
||||
# trampoline- HTLC we are supposed to forward, and have already forwarded
|
||||
payment_key_outer_onion = bytes.fromhex(forwarding_info)
|
||||
|
||||
Reference in New Issue
Block a user