mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 18:31:20 +02:00
channeldb: return error when payment is not initialized
This commit changes `fetchPaymentStatus` to return an error when the payment creation info bucket cannot be found. Instead of using the ambiguous status `StatusUnknown`, we tell the callsite explictly that there's no such payment. This also means the vague `StatusUnknown` can now be removed as it has multiple meanings.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
21cecc40e1
commit
6be3817eed
@@ -1370,9 +1370,6 @@ func convertPaymentStatus(dbStatus channeldb.PaymentStatus) (
|
||||
lnrpc.Payment_PaymentStatus, error) {
|
||||
|
||||
switch dbStatus {
|
||||
case channeldb.StatusUnknown:
|
||||
return lnrpc.Payment_UNKNOWN, nil
|
||||
|
||||
case channeldb.StatusInFlight:
|
||||
return lnrpc.Payment_IN_FLIGHT, nil
|
||||
|
||||
|
Reference in New Issue
Block a user