Skip to content

Commit 01d49fc

Browse files
committed
Log payment hash of the HTLC that causes a force closure
When LDK force closes a channel because of an HTLC time out, we would like to know the payment hash of the HTLC so we can debug the reason for time out.
1 parent 3b939c0 commit 01d49fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5508,7 +5508,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
55085508
let htlc_outbound = $holder_tx == htlc.offered;
55095509
if ( htlc_outbound && htlc.cltv_expiry + LATENCY_GRACE_PERIOD_BLOCKS <= height) ||
55105510
(!htlc_outbound && htlc.cltv_expiry <= height + CLTV_CLAIM_BUFFER && self.payment_preimages.contains_key(&htlc.payment_hash)) {
5511-
log_info!(logger, "Force-closing channel due to {} HTLC timeout, HTLC expiry is {}", if htlc_outbound { "outbound" } else { "inbound "}, htlc.cltv_expiry);
5511+
log_info!(logger, "Force-closing channel due to {} HTLC timeout, HTLC expiry is {}, HTLC payment_hash is {}", if htlc_outbound { "outbound" } else { "inbound "}, htlc.cltv_expiry, htlc.payment_hash);
55125512
return true;
55135513
}
55145514
}

0 commit comments

Comments
 (0)