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