Skip to content

Commit b34c6b0

Browse files
committed
Include payment hash when logging invoice handling
1 parent bd0c1a0 commit b34c6b0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lightning/src/ln/channelmanager.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -10622,6 +10622,10 @@ where
1062210622
_ => return ResponseInstruction::NoResponse,
1062310623
};
1062410624

10625+
let logger = WithContext::from(
10626+
&self.logger, None, None, Some(invoice.payment_hash()),
10627+
);
10628+
1062510629
let result = match invoice.verify(expanded_key, secp_ctx) {
1062610630
Ok(payment_id) => {
1062710631
if let Some(expected_payment_id) = expected_payment_id {
@@ -10640,7 +10644,7 @@ where
1064010644
} else {
1064110645
self.send_payment_for_verified_bolt12_invoice(&invoice, payment_id)
1064210646
.map_err(|e| {
10643-
log_trace!(self.logger, "Failed paying invoice: {:?}", e);
10647+
log_trace!(logger, "Failed paying invoice: {:?}", e);
1064410648
InvoiceError::from_string(format!("{:?}", e))
1064510649
})
1064610650
}
@@ -10658,7 +10662,7 @@ where
1065810662
None => {
1065910663
abandon_if_payment(context);
1066010664
log_trace!(
10661-
self.logger,
10665+
logger,
1066210666
"An error response was generated, but there is no reply_path specified \
1066310667
for sending the response. Error: {}",
1066410668
err

0 commit comments

Comments
 (0)