Skip to content

Commit 874b9c7

Browse files
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. Co-authored-by: Matt Corallo <[email protected]>
1 parent b39d32c commit 874b9c7

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
@@ -5599,7 +5599,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
55995599
let htlc_outbound = $holder_tx == htlc.offered;
56005600
if ( htlc_outbound && htlc.cltv_expiry + LATENCY_GRACE_PERIOD_BLOCKS <= height) ||
56015601
(!htlc_outbound && htlc.cltv_expiry <= height + CLTV_CLAIM_BUFFER && self.payment_preimages.contains_key(&htlc.payment_hash)) {
5602-
log_info!(logger, "Force-closing channel due to {} HTLC timeout, HTLC expiry is {}", if htlc_outbound { "outbound" } else { "inbound "}, htlc.cltv_expiry);
5602+
log_info!(logger, "Force-closing channel due to {} HTLC timeout - HTLC with payment hash {} expires at {}", if htlc_outbound { "outbound" } else { "inbound"}, htlc.payment_hash, htlc.cltv_expiry);
56035603
return true;
56045604
}
56055605
}

0 commit comments

Comments
 (0)