multi: add SpewLogClosure to avoid code repetition
This commit is contained in:
19 files changed
+57
-144
No files matched your search
+3
-8
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/go-errors/errors"
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
@@ -2537,13 +2536,9 @@ func (l *channelLink) updateCommitTx() error {
|
||||
l.log.Tracef("revocation window exhausted, unable to send: "+
|
||||
"%v, pend_updates=%v, dangling_closes%v",
|
||||
l.channel.PendingLocalUpdateCount(),
|
||||
lnutils.NewLogClosure(func() string {
|
||||
return spew.Sdump(l.openedCircuits)
|
||||
}),
|
||||
lnutils.NewLogClosure(func() string {
|
||||
return spew.Sdump(l.closedCircuits)
|
||||
}),
|
||||
)
|
||||
lnutils.SpewLogClosure(l.openedCircuits),
|
||||
lnutils.SpewLogClosure(l.closedCircuits))
|
||||
|
||||
return nil
|
||||
} else if err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user