mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 14:17:56 +01:00
routing+htlcswitch+discovery+peer+netann: optimize debug logging with lazy evaluation
In this commit, we update the network and routing layer components to use lnutils.SpewLogClosure for debug logging.
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/lightningnetwork/lnd/amp"
|
||||
"github.com/lightningnetwork/lnd/clock"
|
||||
"github.com/lightningnetwork/lnd/fn/v2"
|
||||
@@ -958,7 +957,8 @@ func spewPayment(payment *LightningPayment) lnutils.LogClosure {
|
||||
}
|
||||
p := *payment
|
||||
p.RouteHints = routeHints
|
||||
return spew.Sdump(p)
|
||||
|
||||
return lnutils.SpewLogClosure(p)()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user