mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-21 14:04:06 +01:00
lnrpc: update routerrpc to use the new status
This commit is contained in:
parent
c175386c4d
commit
65879a45e6
5 changed files with 1011 additions and 983 deletions
File diff suppressed because it is too large
Load diff
|
@ -3903,10 +3903,20 @@ message Payment {
|
|||
string payment_request = 9;
|
||||
|
||||
enum PaymentStatus {
|
||||
UNKNOWN = 0;
|
||||
// Deprecated. This status will never be returned.
|
||||
UNKNOWN = 0 [deprecated = true];
|
||||
|
||||
// Payment has inflight HTLCs.
|
||||
IN_FLIGHT = 1;
|
||||
|
||||
// Payment is settled.
|
||||
SUCCEEDED = 2;
|
||||
|
||||
// Payment is failed.
|
||||
FAILED = 3;
|
||||
|
||||
// Payment is created and has not attempted any HTLCs.
|
||||
INITIATED = 4;
|
||||
}
|
||||
|
||||
// The status of the payment.
|
||||
|
|
|
@ -2876,9 +2876,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."
|
||||
},
|
||||
"PeerEventEventType": {
|
||||
"type": "string",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue