routing: prevent logging the public key params within the routing hints
This commit is contained in:
1 file changed
+7
@@ -1505,7 +1505,14 @@ type LightningPayment struct {
|
||||
func (r *ChannelRouter) SendPayment(payment *LightningPayment) ([32]byte, *Route, error) {
|
||||
log.Tracef("Dispatching route for lightning payment: %v",
|
||||
newLogClosure(func() string {
|
||||
// Remove the public key curve parameters when logging
|
||||
// the route to prevent spamming the logs.
|
||||
payment.Target.Curve = nil
|
||||
for _, routeHint := range payment.RouteHints {
|
||||
for _, hopHint := range routeHint {
|
||||
hopHint.NodeID.Curve = nil
|
||||
}
|
||||
}
|
||||
return spew.Sdump(payment)
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user