routerrpc+itest: make sure TrackPayments is compatible

This commit adds an itest case to make sure when the flag
`routerrpc.usestatusinitiated` is not set, the new status is not sent.
This commit is contained in:
yyforyongyu
2023-11-15 19:58:52 +08:00
parent 9acbbf0ec7
commit 99354313d5
3 changed files with 114 additions and 20 deletions

View File

@@ -940,6 +940,9 @@ func (s *Server) trackPaymentStream(context context.Context,
}
result := item.(*channeldb.MPPayment)
log.Tracef("Payment %v updated to state %v",
result.Info.PaymentIdentifier, result.Status)
// Skip in-flight updates unless requested.
if noInflightUpdates {
if result.Status == channeldb.StatusInitiated {