mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 18:26:18 +02:00
channeldb+routing: add NeedWaitAttempts
to decide waiting for attempts
This commit adds a new method, `NeedWaitAttempts`, to properly decide whether we need to wait for the outcome of htlc attempts based on the payment's current state.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
89ac071e56
commit
e5840f6216
@@ -30,6 +30,13 @@ var (
|
||||
// existing payment that is not failed.
|
||||
ErrPaymentExists = errors.New("payment already exists")
|
||||
|
||||
// ErrPaymentInternal is returned when performing the payment has a
|
||||
// conflicting state, such as,
|
||||
// - payment has StatusSucceeded but remaining amount is not zero.
|
||||
// - payment has StatusInitiated but remaining amount is zero.
|
||||
// - payment has StatusFailed but remaining amount is zero.
|
||||
ErrPaymentInternal = errors.New("internal error")
|
||||
|
||||
// ErrPaymentNotInitiated is returned if the payment wasn't initiated.
|
||||
ErrPaymentNotInitiated = errors.New("payment isn't initiated")
|
||||
|
||||
|
Reference in New Issue
Block a user