mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 17:01:11 +02:00
multi: add SpewLogClosure
to avoid code repetition
This commit is contained in:
@@ -15,7 +15,6 @@ import (
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/channeldb/models"
|
||||
"github.com/lightningnetwork/lnd/invoices"
|
||||
@@ -474,10 +473,7 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig,
|
||||
}
|
||||
|
||||
log.Tracef("[addinvoice] adding new invoice %v",
|
||||
lnutils.NewLogClosure(func() string {
|
||||
return spew.Sdump(newInvoice)
|
||||
}),
|
||||
)
|
||||
lnutils.SpewLogClosure(newInvoice))
|
||||
|
||||
// With all sanity checks passed, write the invoice to the database.
|
||||
_, err = cfg.AddInvoice(ctx, newInvoice, paymentHash)
|
||||
|
Reference in New Issue
Block a user