@@ -14,7 +14,6 @@ import (
1414 "github.com/btcsuite/btcd/chaincfg/chainhash"
1515 "github.com/btcsuite/btcd/txscript"
1616 "github.com/btcsuite/btcd/wire"
17- "github.com/davecgh/go-spew/spew"
1817 "github.com/lightningnetwork/lnd/channeldb"
1918 "github.com/lightningnetwork/lnd/channeldb/models"
2019 "github.com/lightningnetwork/lnd/fn"
@@ -466,10 +465,8 @@ func (c *ChannelArbitrator) Start(state *chanArbStartState) error {
466465 }
467466
468467 log .Debugf ("Starting ChannelArbitrator(%v), htlc_set=%v, state=%v" ,
469- c .cfg .ChanPoint , lnutils .NewLogClosure (func () string {
470- return spew .Sdump (c .activeHTLCs )
471- }), state .currentState ,
472- )
468+ c .cfg .ChanPoint , lnutils .SpewLogClosure (c .activeHTLCs ),
469+ state .currentState )
473470
474471 // Set our state from our starting state.
475472 c .state = state .currentState
@@ -959,10 +956,7 @@ func (c *ChannelArbitrator) stateStep(
959956 // Otherwise, we'll log that we checked the HTLC actions as the
960957 // commitment transaction has already been broadcast.
961958 log .Tracef ("ChannelArbitrator(%v): logging chain_actions=%v" ,
962- c .cfg .ChanPoint ,
963- lnutils .NewLogClosure (func () string {
964- return spew .Sdump (chainActions )
965- }))
959+ c .cfg .ChanPoint , lnutils .SpewLogClosure (chainActions ))
966960
967961 // Depending on the type of trigger, we'll either "tunnel"
968962 // through to a farther state, or just proceed linearly to the
@@ -1097,10 +1091,7 @@ func (c *ChannelArbitrator) stateStep(
10971091 // channel resolution state.
10981092 log .Infof ("Broadcasting force close transaction %v, " +
10991093 "ChannelPoint(%v): %v" , closeTx .TxHash (),
1100- c .cfg .ChanPoint ,
1101- lnutils .NewLogClosure (func () string {
1102- return spew .Sdump (closeTx )
1103- }))
1094+ c .cfg .ChanPoint , lnutils .SpewLogClosure (closeTx ))
11041095
11051096 // At this point, we'll now broadcast the commitment
11061097 // transaction itself.
@@ -1225,9 +1216,7 @@ func (c *ChannelArbitrator) stateStep(
12251216 if len (pktsToSend ) != 0 {
12261217 log .Debugf ("ChannelArbitrator(%v): sending " +
12271218 "resolution message=%v" , c .cfg .ChanPoint ,
1228- lnutils .NewLogClosure (func () string {
1229- return spew .Sdump (pktsToSend )
1230- }))
1219+ lnutils .SpewLogClosure (pktsToSend ))
12311220
12321221 err := c .cfg .DeliverResolutionMsg (pktsToSend ... )
12331222 if err != nil {
@@ -2742,11 +2731,7 @@ func (c *ChannelArbitrator) notifyContractUpdate(upd *ContractUpdate) {
27422731 c .unmergedSet [upd .HtlcKey ] = newHtlcSet (upd .Htlcs )
27432732
27442733 log .Tracef ("ChannelArbitrator(%v): fresh set of htlcs=%v" ,
2745- c .cfg .ChanPoint ,
2746- lnutils .NewLogClosure (func () string {
2747- return spew .Sdump (upd )
2748- }),
2749- )
2734+ c .cfg .ChanPoint , lnutils .SpewLogClosure (upd ))
27502735}
27512736
27522737// updateActiveHTLCs merges the unmerged set of HTLCs from the link with
0 commit comments