Skip to content

Commit 20362b8

Browse files
committed
Include payment hash when logging InvoiceError
1 parent 84198b0 commit 20362b8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10418,7 +10418,12 @@ where
1041810418
}
1041910419
},
1042010420
OffersMessage::InvoiceError(invoice_error) => {
10421-
log_trace!(self.logger, "Received invoice_error: {}", invoice_error);
10421+
let payment_hash = match context {
10422+
OffersContext::InboundPayment { payment_hash } => Some(payment_hash),
10423+
_ => None,
10424+
};
10425+
let logger = WithContext::from(&self.logger, None, None, payment_hash);
10426+
log_trace!(logger, "Received invoice_error: {}", invoice_error);
1042210427
ResponseInstruction::NoResponse
1042310428
},
1042410429
}

0 commit comments

Comments
 (0)