From 310e20f8b7a7ec4398afdf0affa8f6fcfc4ee197 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 7 Apr 2020 11:54:29 -0700 Subject: [PATCH] invoices/invoiceregistry: remove debug spew --- channeldb/invoices.go | 6 ++++++ invoices/invoiceregistry.go | 8 ++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/channeldb/invoices.go b/channeldb/invoices.go index 7287910d7..f1954bf3b 100644 --- a/channeldb/invoices.go +++ b/channeldb/invoices.go @@ -203,6 +203,12 @@ type ContractTerm struct { Features *lnwire.FeatureVector } +// String returns a human-readable description of the prominent contract terms. +func (c ContractTerm) String() string { + return fmt.Sprintf("amt=%v, expiry=%v, final_cltv_delta=%v", c.Value, + c.Expiry, c.FinalCltvDelta) +} + // Invoice is a payment invoice generated by a payee in order to request // payment for some good or service. The inclusion of invoices within Lightning // creates a payment work flow for merchants very similar to that of the diff --git a/invoices/invoiceregistry.go b/invoices/invoiceregistry.go index 00885edb9..662a8a82e 100644 --- a/invoices/invoiceregistry.go +++ b/invoices/invoiceregistry.go @@ -7,7 +7,6 @@ import ( "sync/atomic" "time" - "github.com/davecgh/go-spew/spew" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/clock" "github.com/lightningnetwork/lnd/lntypes" @@ -503,11 +502,8 @@ func (i *InvoiceRegistry) AddInvoice(invoice *channeldb.Invoice, i.Lock() - log.Debugf("Invoice(%v): added %v", paymentHash, - newLogClosure(func() string { - return spew.Sdump(invoice) - }), - ) + log.Debugf("Invoice(%v): added with terms %v", paymentHash, + invoice.Terms) addIndex, err := i.cdb.AddInvoice(invoice, paymentHash) if err != nil {