From e6561ca86dc89b44bf89444ec02d727ef174e33a Mon Sep 17 00:00:00 2001 From: Andras Banki-Horvath Date: Mon, 3 Feb 2020 14:24:22 +0100 Subject: [PATCH] invoices: fix log messages This commit fixes incorrect log messages. --- invoices/invoice_expiry_watcher.go | 4 ++-- invoices/invoiceregistry.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/invoices/invoice_expiry_watcher.go b/invoices/invoice_expiry_watcher.go index 07c217808..08c57f396 100644 --- a/invoices/invoice_expiry_watcher.go +++ b/invoices/invoice_expiry_watcher.go @@ -108,7 +108,7 @@ func (ew *InvoiceExpiryWatcher) prepareInvoice( paymentHash lntypes.Hash, invoice *channeldb.Invoice) *invoiceExpiry { if invoice.State != channeldb.ContractOpen { - log.Debugf("Invoice not added to expiry watcher: %v", invoice) + log.Debugf("Invoice not added to expiry watcher: %v", paymentHash) return nil } @@ -139,7 +139,7 @@ func (ew *InvoiceExpiryWatcher) AddInvoices( } if len(invoicesWithExpiry) > 0 { - log.Debugf("Added %v invoices to the expiry watcher: %v", + log.Debugf("Added %d invoices to the expiry watcher", len(invoicesWithExpiry)) select { case ew.newInvoices <- invoicesWithExpiry: diff --git a/invoices/invoiceregistry.go b/invoices/invoiceregistry.go index 4b3a1b2d8..75cd170da 100644 --- a/invoices/invoiceregistry.go +++ b/invoices/invoiceregistry.go @@ -198,7 +198,8 @@ func (i *InvoiceRegistry) populateExpiryWatcher() error { return err } - log.Debugf("Adding %v pending invoices to the expiry watcher") + log.Debugf("Adding %d pending invoices to the expiry watcher", + len(pendingInvoices)) i.expiryWatcher.AddInvoices(pendingInvoices) return nil }