Skip to content

Commit 51daa13

Browse files
committed
routerrpc: improve logging in forwardInterceptor
1 parent 37799b9 commit 51daa13

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lnrpc/routerrpc/forward_interceptor.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"github.com/lightningnetwork/lnd/htlcswitch"
99
"github.com/lightningnetwork/lnd/lnrpc"
1010
"github.com/lightningnetwork/lnd/lntypes"
11+
"github.com/lightningnetwork/lnd/lnutils"
1112
"github.com/lightningnetwork/lnd/lnwire"
1213
"google.golang.org/grpc/codes"
1314
"google.golang.org/grpc/status"
@@ -60,6 +61,9 @@ func (r *forwardInterceptor) run() error {
6061
return err
6162
}
6263

64+
log.Tracef("Received packet from stream: %v",
65+
lnutils.SpewLogClosure(resp))
66+
6367
if err := r.resolveFromClient(resp); err != nil {
6468
return err
6569
}
@@ -73,7 +77,8 @@ func (r *forwardInterceptor) run() error {
7377
func (r *forwardInterceptor) onIntercept(
7478
htlc htlcswitch.InterceptedPacket) error {
7579

76-
log.Tracef("Sending intercepted packet to client %v", htlc)
80+
log.Tracef("Sending intercepted packet to client %v",
81+
lnutils.SpewLogClosure(htlc))
7782

7883
inKey := htlc.IncomingCircuit
7984

0 commit comments

Comments
 (0)