Skip to content

Commit 1cc69a3

Browse files
committed
Include payment hash when logging invoice handling
1 parent 9d81e29 commit 1cc69a3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10624,6 +10624,10 @@ where
1062410624
_ => return ResponseInstruction::NoResponse,
1062510625
};
1062610626

10627+
let logger = WithContext::from(
10628+
&self.logger, None, None, Some(invoice.payment_hash()),
10629+
);
10630+
1062710631
let result = match invoice.verify(expanded_key, secp_ctx) {
1062810632
Ok(payment_id) => {
1062910633
if let Some(expected_payment_id) = expected_payment_id {
@@ -10642,7 +10646,7 @@ where
1064210646
} else {
1064310647
self.send_payment_for_verified_bolt12_invoice(&invoice, payment_id)
1064410648
.map_err(|e| {
10645-
log_trace!(self.logger, "Failed paying invoice: {:?}", e);
10649+
log_trace!(logger, "Failed paying invoice: {:?}", e);
1064610650
InvoiceError::from_string(format!("{:?}", e))
1064710651
})
1064810652
}
@@ -10660,7 +10664,7 @@ where
1066010664
None => {
1066110665
abandon_if_payment(context);
1066210666
log_trace!(
10663-
self.logger,
10667+
logger,
1066410668
"An error response was generated, but there is no reply_path specified \
1066510669
for sending the response. Error: {}",
1066610670
err

0 commit comments

Comments
 (0)