lnrpc: update routerrpc to use the new status

This commit is contained in:
yyforyongyu authored and Olaoluwa Osuntokun committed 2023-10-06 16:34:47 -07:00
1 parent c175386c4d
commit 65879a45e6
5 files changed
+1011 -983

No files matched your search

+4 -2
View File
@@ -1015,9 +1015,11 @@
"UNKNOWN",
"IN_FLIGHT",
"SUCCEEDED",
"FAILED"
"FAILED",
"INITIATED"
],
"default": "UNKNOWN"
"default": "UNKNOWN",
"description": " - UNKNOWN: Deprecated. This status will never be returned.\n - IN_FLIGHT: Payment has inflight HTLCs.\n - SUCCEEDED: Payment is settled.\n - FAILED: Payment is failed.\n - INITIATED: Payment is created and has not attempted any HTLCs."
},
"lnrpcRoute": {
"type": "object",
+3
View File
@@ -1370,6 +1370,9 @@ func convertPaymentStatus(dbStatus channeldb.PaymentStatus) (
lnrpc.Payment_PaymentStatus, error) {
switch dbStatus {
case channeldb.StatusInitiated:
return lnrpc.Payment_INITIATED, nil
case channeldb.StatusInFlight:
return lnrpc.Payment_IN_FLIGHT, nil