1
0

lnpeer: forwarding: dont release preimage if dont_settle_htlc

If a payment hash is in LNWallet.dont_settle_htlcs the preimage
shouldn't be released even when just forwarding.
This commit is contained in:
f321x
2025-12-11 18:47:56 +01:00
parent 0b886cf7a8
commit 9906eb42ac

View File

@@ -3240,7 +3240,10 @@ class Peer(Logger, EventListener):
# this was a forwarding set and it failed
self.lnworker.set_mpp_resolution(payment_key, RecvMPPResolution.FAILED)
return error_bytes or failure_message, None, None
preimage = self.lnworker.get_preimage(mpp_set.get_payment_hash())
payment_hash = mpp_set.get_payment_hash()
if payment_hash.hex() in self.lnworker.dont_settle_htlcs:
return None, None, None
preimage = self.lnworker.get_preimage(payment_hash)
return None, preimage, None
return None