You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds two new payment `Method`s for identifying payments with custom
`min_final_cltv_expiry_delta` as payments with LDK or user payment
hashes.
The `min_final_cltv_expiry_delta` value is packed into the metadata
bytes of the payment secret, taking up 12 bits.
Copy file name to clipboardExpand all lines: lightning/src/ln/channelmanager.rs
+29-5Lines changed: 29 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1918,6 +1918,7 @@ where
1918
1918
// final_expiry_too_soon
1919
1919
// We have to have some headroom to broadcast on chain if we have the preimage, so make sure
1920
1920
// we have at least HTLC_FAIL_BACK_BUFFER blocks to go.
1921
+
//
1921
1922
// Also, ensure that, in the case of an unknown preimage for the received payment hash, our
1922
1923
// payment logic has enough time to fail the HTLC backward before our onchain logic triggers a
1923
1924
// channel closure (see HTLC_FAIL_BACK_BUFFER rationale).
@@ -3184,10 +3185,21 @@ where
3184
3185
let payment_preimage = match inbound_payment::verify(payment_hash,&payment_data,self.highest_seen_timestamp.load(Ordering::Acquire)asu64,&self.inbound_payment_key,&self.logger){
3185
3186
Ok(payment_preimage) => payment_preimage,
3186
3187
Err(()) => {
3188
+
log_trace!(self.logger,"Failing new HTLC with payment_hash {} as payment verification failed", log_bytes!(payment_hash.0));
0 commit comments