Allow overshooting final cltv_expiry
[rust-lightning] / lightning / src / ln / channelmanager.rs
index 617ac3968c41df38a7ed6547cfb308950965e4b9..fb1f6b4a8481d33c82286c5f52ddef7c16f6d463 100644 (file)
@@ -2095,9 +2095,9 @@ where
                payment_hash: PaymentHash, amt_msat: u64, cltv_expiry: u32, phantom_shared_secret: Option<[u8; 32]>) -> Result<PendingHTLCInfo, ReceiveError>
        {
                // final_incorrect_cltv_expiry
-               if hop_data.outgoing_cltv_value != cltv_expiry {
+               if hop_data.outgoing_cltv_value > cltv_expiry {
                        return Err(ReceiveError {
-                               msg: "Upstream node set CLTV to the wrong value",
+                               msg: "Upstream node set CLTV to less than the CLTV set by the sender",
                                err_code: 18,
                                err_data: cltv_expiry.to_be_bytes().to_vec()
                        })