invoices: move log into update context

This commit is contained in:
Joost Jager committed 2020-02-04 15:22:06 +01:00
1 parent a339065fdc
commit 51324ac7ae
2 files changed
+9 -8

No files matched your search

+6
View File
@@ -180,6 +180,12 @@ type invoiceUpdateCtx struct {
mpp *record.MPP
}
// log logs a message specific to this update context.
func (i *invoiceUpdateCtx) log(s string) {
log.Debugf("Invoice(%x): %v, amt=%v, expiry=%v, circuit=%v, mpp=%v",
i.hash[:], s, i.amtPaid, i.expiry, i.circuitKey, i.mpp)
}
// updateInvoice is a callback for DB.UpdateInvoice that contains the invoice
// settlement logic.
func updateInvoice(ctx *invoiceUpdateCtx, inv *channeldb.Invoice) (