From 922130c80e9d5e77a829fa5e3de85a6bcd3ba464 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 14 Nov 2023 17:46:20 +0800 Subject: [PATCH] routerrpc: skip initiated payment in `trackPaymentStream` --- lnrpc/routerrpc/router_server.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lnrpc/routerrpc/router_server.go b/lnrpc/routerrpc/router_server.go index 2d48e675b..595eb1ea0 100644 --- a/lnrpc/routerrpc/router_server.go +++ b/lnrpc/routerrpc/router_server.go @@ -941,10 +941,13 @@ func (s *Server) trackPaymentStream(context context.Context, result := item.(*channeldb.MPPayment) // Skip in-flight updates unless requested. - if noInflightUpdates && - result.Status == channeldb.StatusInFlight { - - continue + if noInflightUpdates { + if result.Status == channeldb.StatusInitiated { + continue + } + if result.Status == channeldb.StatusInFlight { + continue + } } rpcPayment, err := s.cfg.RouterBackend.MarshallPayment(