88 "github.com/btcsuite/btcd/btcec/v2"
99 "github.com/btcsuite/btcd/btcutil"
1010 "github.com/btcsuite/btcd/chaincfg/chainhash"
11- "github.com/davecgh/go-spew/spew"
1211 "github.com/lightningnetwork/lnd/graph/db/models"
1312 "github.com/lightningnetwork/lnd/keychain"
13+ "github.com/lightningnetwork/lnd/lnutils"
1414 "github.com/lightningnetwork/lnd/lnwallet"
1515 "github.com/lightningnetwork/lnd/lnwire"
1616 "github.com/lightningnetwork/lnd/tlv"
@@ -226,7 +226,7 @@ func verifyChannelUpdate1Signature(msg *lnwire.ChannelUpdate1,
226226
227227 if ! nodeSig .Verify (dataHash , pubKey ) {
228228 return fmt .Errorf ("invalid signature for channel update %v" ,
229- spew . Sdump (msg ))
229+ lnutils . SpewLogClosure (msg ))
230230 }
231231
232232 return nil
@@ -249,7 +249,7 @@ func verifyChannelUpdate2Signature(c *lnwire.ChannelUpdate2,
249249
250250 if ! nodeSig .Verify (digest , pubKey ) {
251251 return fmt .Errorf ("invalid signature for channel update %v" ,
252- spew . Sdump (c ))
252+ lnutils . SpewLogClosure (c ))
253253 }
254254
255255 return nil
@@ -279,13 +279,13 @@ func validateChannelUpdate1Fields(capacity btcutil.Amount,
279279 // The maxHTLC flag is mandatory.
280280 if ! msg .MessageFlags .HasMaxHtlc () {
281281 return fmt .Errorf ("max htlc flag not set for channel " +
282- "update %v" , spew . Sdump (msg ))
282+ "update %v" , lnutils . SpewLogClosure (msg ))
283283 }
284284
285285 maxHtlc := msg .HtlcMaximumMsat
286286 if maxHtlc == 0 || maxHtlc < msg .HtlcMinimumMsat {
287287 return fmt .Errorf ("invalid max htlc for channel " +
288- "update %v" , spew . Sdump (msg ))
288+ "update %v" , lnutils . SpewLogClosure (msg ))
289289 }
290290
291291 // For light clients, the capacity will not be set so we'll skip
@@ -308,7 +308,7 @@ func validateChannelUpdate2Fields(capacity btcutil.Amount,
308308 maxHtlc := c .HTLCMaximumMsat .Val
309309 if maxHtlc == 0 || maxHtlc < c .HTLCMinimumMsat .Val {
310310 return fmt .Errorf ("invalid max htlc for channel update %v" ,
311- spew . Sdump (c ))
311+ lnutils . SpewLogClosure (c ))
312312 }
313313
314314 // Checking whether the MaxHTLC value respects the channel's capacity.
0 commit comments