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

@@ -14,7 +14,6 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"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"
@@ -432,10 +431,7 @@ search:
}
log.Tracef("Retrieved SRV records from dns seed: %v",
lnutils.NewLogClosure(func() string {
return spew.Sdump(addrs)
}),
)
lnutils.SpewLogClosure(addrs))
// Next, we'll need to issue an A record request for each of
// the nodes, skipping it if nothing comes back.