mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-12 04:55:43 +02:00
channeldb: add new payment status StatusInitiated
This commit adds a new payment status, `StatusInitiated`, to properly represent the state where a payment is newly created without attempting any HTLCs. Since the `PaymentStatus` is a memory representation of a given payment's status, the enum used for the statuses are directly updated.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
6be3817eed
commit
30fd29371c
@@ -2276,7 +2276,8 @@ func (r *ChannelRouter) sendToRoute(htlcHash lntypes.Hash, rt *route.Route,
|
||||
switch {
|
||||
// If this is an MPP attempt and the hash is already registered with
|
||||
// the database, we can go on to launch the shard.
|
||||
case err == channeldb.ErrPaymentInFlight && mpp != nil:
|
||||
case mpp != nil && errors.Is(err, channeldb.ErrPaymentInFlight):
|
||||
case mpp != nil && errors.Is(err, channeldb.ErrPaymentExists):
|
||||
|
||||
// Any other error is not tolerated.
|
||||
case err != nil:
|
||||
|
Reference in New Issue
Block a user