Skip to content

Commit cfd3163

Browse files
committed
Include payment hash when logging invoice handling
1 parent 20362b8 commit cfd3163

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
@@ -10369,6 +10369,10 @@ where
1036910369
_ => return ResponseInstruction::NoResponse,
1037010370
};
1037110371

10372+
let logger = WithContext::from(
10373+
&self.logger, None, None, Some(invoice.payment_hash()),
10374+
);
10375+
1037210376
let result = match invoice.verify(expanded_key, secp_ctx) {
1037310377
Ok(payment_id) => {
1037410378
if let Some(expected_payment_id) = expected_payment_id {
@@ -10387,7 +10391,7 @@ where
1038710391
} else {
1038810392
self.send_payment_for_verified_bolt12_invoice(&invoice, payment_id)
1038910393
.map_err(|e| {
10390-
log_trace!(self.logger, "Failed paying invoice: {:?}", e);
10394+
log_trace!(logger, "Failed paying invoice: {:?}", e);
1039110395
InvoiceError::from_string(format!("{:?}", e))
1039210396
})
1039310397
}
@@ -10400,7 +10404,7 @@ where
1040010404
Err(e) => match responder {
1040110405
Some(responder) => responder.respond(OffersMessage::InvoiceError(e)),
1040210406
None => {
10403-
log_trace!(self.logger, "No reply path for sending invoice error: {:?}", e);
10407+
log_trace!(logger, "No reply path for sending invoice error: {:?}", e);
1040410408
ResponseInstruction::NoResponse
1040510409
},
1040610410
},

0 commit comments

Comments
 (0)