Include payment hash in more early payment logs
[rust-lightning] / lightning / src / ln / channel.rs
index f66f48c50499daf83bc4b1ab4669ff9ddc76078c..d1479dd1bca575a5d9f1bbf977c5a56952e24d92 100644 (file)
@@ -2217,6 +2217,8 @@ impl<SP: Deref> Channel<SP> where
                for (idx, htlc) in self.context.pending_inbound_htlcs.iter().enumerate() {
                        if htlc.htlc_id == htlc_id_arg {
                                assert_eq!(htlc.payment_hash, payment_hash_calc);
+                               log_debug!(logger, "Claiming inbound HTLC id {} with payment hash {} with preimage {}",
+                                       htlc.htlc_id, htlc.payment_hash, payment_preimage_arg);
                                match htlc.state {
                                        InboundHTLCState::Committed => {},
                                        InboundHTLCState::LocalRemoved(ref reason) => {
@@ -5210,7 +5212,8 @@ impl<SP: Deref> Channel<SP> where
                }
 
                let need_holding_cell = (self.context.channel_state & (ChannelState::AwaitingRemoteRevoke as u32 | ChannelState::MonitorUpdateInProgress as u32)) != 0;
-               log_debug!(logger, "Pushing new outbound HTLC for {} msat {}", amount_msat,
+               log_debug!(logger, "Pushing new outbound HTLC with hash {} for {} msat {}",
+                       payment_hash, amount_msat,
                        if force_holding_cell { "into holding cell" }
                        else if need_holding_cell { "into holding cell as we're awaiting an RAA or monitor" }
                        else { "to peer" });