multi: add SpewLogClosure to avoid code repetition

This commit is contained in:
yyforyongyu
2024-07-25 22:18:00 +08:00
parent b6049ff94b
commit d992cf94d6
19 changed files with 57 additions and 144 deletions

View File

@ -12,7 +12,6 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/wire"
"github.com/davecgh/go-spew/spew"
"github.com/go-errors/errors"
"github.com/lightningnetwork/lnd/batch"
"github.com/lightningnetwork/lnd/chainntnfs"
@ -1432,9 +1431,7 @@ func (b *Builder) processUpdate(msg interface{},
}
log.Tracef("New channel update applied: %v",
lnutils.NewLogClosure(func() string {
return spew.Sdump(msg)
}))
lnutils.SpewLogClosure(msg))
b.stats.incNumChannelUpdates()
default: