multi: move FailureReason to payment package

This commit is contained in:
ziggie committed 2025-08-14 19:53:18 +02:00
1 parent d77b2f9c26
commit d138e23919
19 files changed
+134 -140

No files matched your search

+4 -4
View File
@@ -5,17 +5,17 @@ import (
"fmt"
"io"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/fn/v2"
"github.com/lightningnetwork/lnd/lnwire"
paymentsdb "github.com/lightningnetwork/lnd/payments/db"
"github.com/lightningnetwork/lnd/routing/route"
"github.com/lightningnetwork/lnd/tlv"
)
// Instantiate variables to allow taking a reference from the failure reason.
var (
reasonError = channeldb.FailureReasonError
reasonIncorrectDetails = channeldb.FailureReasonPaymentDetails
reasonError = paymentsdb.FailureReasonError
reasonIncorrectDetails = paymentsdb.FailureReasonPaymentDetails
)
// pairResult contains the result of the interpretation of a payment attempt for
@@ -70,7 +70,7 @@ type interpretedResult struct {
// finalFailureReason is set to a non-nil value if it makes no more
// sense to start another payment attempt. It will contain the reason
// why.
finalFailureReason *channeldb.FailureReason
finalFailureReason *paymentsdb.FailureReason
// policyFailure is set to a node pair if there is a policy failure on
// that connection. This is used to control the second chance logic for