From 3ad15c5f42be825860be19dda2a99d3a028dc5f3 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sat, 30 Jun 2018 17:14:59 -0500 Subject: [PATCH] hltcswitch: use a logClosure to delay spew evaluation until log print time --- htlcswitch/link.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htlcswitch/link.go b/htlcswitch/link.go index b60b43f1..d02c4672 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -1566,8 +1566,13 @@ func (l *channelLink) updateCommitTx() error { if err == lnwallet.ErrNoWindow { l.tracef("revocation window exhausted, unable to send: %v, "+ "dangling_opens=%v, dangling_closes%v", - l.batchCounter, spew.Sdump(l.openedCircuits), - spew.Sdump(l.closedCircuits)) + l.batchCounter, newLogClosure(func() string { + return spew.Sdump(l.openedCircuits) + }), + newLogClosure(func() string { + return spew.Sdump(l.closedCircuits) + }), + ) return nil } else if err != nil { return err