mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 15:40:59 +02:00
multi: add SpewLogClosure
to avoid code repetition
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/keychain"
|
||||
"github.com/lightningnetwork/lnd/lnutils"
|
||||
@@ -64,9 +63,8 @@ func Recover(backups []Single, restorer ChannelRestorer,
|
||||
log.Infof("Attempting to connect to node=%x (addrs=%v) to "+
|
||||
"restore ChannelPoint(%v)",
|
||||
backup.RemoteNodePub.SerializeCompressed(),
|
||||
lnutils.NewLogClosure(func() string {
|
||||
return spew.Sdump(backups[i].Addresses)
|
||||
}), backup.FundingOutpoint)
|
||||
lnutils.SpewLogClosure(backups[i].Addresses),
|
||||
backup.FundingOutpoint)
|
||||
|
||||
err = peerConnector.ConnectPeer(
|
||||
backup.RemoteNodePub, backup.Addresses,
|
||||
|
Reference in New Issue
Block a user