multi: move FailureReason to payment package
This commit is contained in:
19 files changed
+134
-140
No files matched your search
@@ -5,12 +5,12 @@ import (
|
||||
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
graphdb "github.com/lightningnetwork/lnd/graph/db"
|
||||
"github.com/lightningnetwork/lnd/graph/db/models"
|
||||
"github.com/lightningnetwork/lnd/lnutils"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/netann"
|
||||
paymentsdb "github.com/lightningnetwork/lnd/payments/db"
|
||||
"github.com/lightningnetwork/lnd/routing/route"
|
||||
)
|
||||
|
||||
@@ -104,7 +104,7 @@ func (e noRouteError) Error() string {
|
||||
}
|
||||
|
||||
// FailureReason converts a path finding error into a payment-level failure.
|
||||
func (e noRouteError) FailureReason() channeldb.FailureReason {
|
||||
func (e noRouteError) FailureReason() paymentsdb.FailureReason {
|
||||
switch e {
|
||||
case
|
||||
errNoTlvPayload,
|
||||
@@ -114,13 +114,13 @@ func (e noRouteError) FailureReason() channeldb.FailureReason {
|
||||
errUnknownRequiredFeature,
|
||||
errMissingDependentFeature:
|
||||
|
||||
return channeldb.FailureReasonNoRoute
|
||||
return paymentsdb.FailureReasonNoRoute
|
||||
|
||||
case errInsufficientBalance:
|
||||
return channeldb.FailureReasonInsufficientBalance
|
||||
return paymentsdb.FailureReasonInsufficientBalance
|
||||
|
||||
default:
|
||||
return channeldb.FailureReasonError
|
||||
return paymentsdb.FailureReasonError
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user