@@ -11,8 +11,8 @@ import (
1111
1212 "github.com/btcsuite/btcd/btcec/v2"
1313 "github.com/btcsuite/btcd/btcutil"
14- "github.com/davecgh/go-spew/spew"
1514 "github.com/lightningnetwork/lnd/fn/v2"
15+ "github.com/lightningnetwork/lnd/lnutils"
1616 "github.com/lightningnetwork/lnd/lnwire"
1717)
1818
@@ -443,7 +443,7 @@ func (a *Agent) controller(ctx context.Context) {
443443 case * chanOpenUpdate :
444444 log .Debugf ("New channel successfully opened, " +
445445 "updating state with: %v" ,
446- spew . Sdump (update .newChan ))
446+ lnutils . SpewLogClosure (update .newChan ))
447447
448448 newChan := update .newChan
449449 a .chanStateMtx .Lock ()
@@ -460,7 +460,9 @@ func (a *Agent) controller(ctx context.Context) {
460460 case * chanCloseUpdate :
461461 log .Debugf ("Applying closed channel " +
462462 "updates: %v" ,
463- spew .Sdump (update .closedChans ))
463+ lnutils .SpewLogClosure (
464+ update .closedChans ),
465+ )
464466
465467 a .chanStateMtx .Lock ()
466468 for _ , closedChan := range update .closedChans {
@@ -515,7 +517,8 @@ func (a *Agent) controller(ctx context.Context) {
515517 }
516518
517519 a .pendingMtx .Lock ()
518- log .Debugf ("Pending channels: %v" , spew .Sdump (a .pendingOpens ))
520+ log .Debugf ("Pending channels: %v" ,
521+ lnutils .SpewLogClosure (a .pendingOpens ))
519522 a .pendingMtx .Unlock ()
520523
521524 // With all the updates applied, we'll obtain a set of the
@@ -699,7 +702,7 @@ func (a *Agent) openChans(ctx context.Context, availableFunds btcutil.Amount,
699702 }
700703
701704 log .Infof ("Attempting to execute channel attachment " +
702- "directives: %v" , spew . Sdump (chanCandidates ))
705+ "directives: %v" , lnutils . SpewLogClosure (chanCandidates ))
703706
704707 // Before proceeding, check to see if we have any slots
705708 // available to open channels. If there are any, we will attempt
0 commit comments