From: Matt Corallo Date: Tue, 4 Apr 2023 04:12:55 +0000 (+0000) Subject: Allow claiming a payment if a channel with an HTLC has closed X-Git-Tag: v0.0.115~32^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ab255895eed9c4d9ed2dc400d7e0c720ea763ba8;hp=ab255895eed9c4d9ed2dc400d7e0c720ea763ba8;p=rust-lightning Allow claiming a payment if a channel with an HTLC has closed Previously, LDK would refuse to claim a payment if a channel on which the payment was received had been closed between when the HTLC was received and when we went to claim it. This makes sense in the payment case - why pay an on-chain fee to claim the HTLC when presumably the sender may retry later. Long ago it also reduced total code in the claim pipeline. However, this doesn't make sense if you're trying to do an atomic swap or some other protocol that requires atomicity with some other action - if your money got claimed elsewhere you need to be able to claim the HTLC in lightning no matter what. Further, this is an over-optimization - there should be a very, very low likelihood that a channel closes between when we receive the last HTLC for a payment and the user goes to claim the payment. Since we now have code to handle this anyway we should allow it. Fixes #2017. ---