multi: add NewLogClosure in lnutils to avoid repetition

And replaces all usage of `logClosure` with `lnutils.LogClosure`.
This commit is contained in:
yyforyongyu committed 2024-07-25 21:25:23 +08:00
1 parent 7e60d41898
commit b6049ff94b
38 files changed
+103 -299

No files matched your search

+2 -1
View File
@@ -16,6 +16,7 @@ import (
"github.com/btcsuite/btcd/btcutil/bech32"
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/autopilot"
"github.com/lightningnetwork/lnd/lnutils"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/tor"
"github.com/miekg/dns"
@@ -431,7 +432,7 @@ search:
}
log.Tracef("Retrieved SRV records from dns seed: %v",
newLogClosure(func() string {
lnutils.NewLogClosure(func() string {
return spew.Sdump(addrs)
}),
)