diff --git a/channeldb/payments.go b/channeldb/payments.go index afe5e1dc..c1ff79e9 100644 --- a/channeldb/payments.go +++ b/channeldb/payments.go @@ -101,9 +101,9 @@ const ( // payment. FailureReasonError FailureReason = 2 - // FailureReasonIncorrectPaymentDetails indicates that either the hash - // is unknown or the final cltv delta or amount is incorrect. - FailureReasonIncorrectPaymentDetails FailureReason = 3 + // FailureReasonPaymentDetails indicates that either the hash is unknown + // or the final cltv delta or amount is incorrect. + FailureReasonPaymentDetails FailureReason = 3 // TODO(halseth): cancel state. @@ -120,7 +120,7 @@ func (r FailureReason) String() string { return "no_route" case FailureReasonError: return "error" - case FailureReasonIncorrectPaymentDetails: + case FailureReasonPaymentDetails: return "incorrect_payment_details" } diff --git a/lnrpc/routerrpc/router_server.go b/lnrpc/routerrpc/router_server.go index ac11dcf3..5cf84dbc 100644 --- a/lnrpc/routerrpc/router_server.go +++ b/lnrpc/routerrpc/router_server.go @@ -645,7 +645,7 @@ func marshallFailureReason(reason channeldb.FailureReason) ( case channeldb.FailureReasonError: return PaymentState_FAILED_ERROR, nil - case channeldb.FailureReasonIncorrectPaymentDetails: + case channeldb.FailureReasonPaymentDetails: return PaymentState_FAILED_INCORRECT_PAYMENT_DETAILS, nil } diff --git a/routing/control_tower.go b/routing/control_tower.go index 812af4e5..ee8d75c8 100644 --- a/routing/control_tower.go +++ b/routing/control_tower.go @@ -142,7 +142,7 @@ func createFailedResult(rt *route.Route, // In case of incorrect payment details, set the route. This can be used // for probing and to extract a fee estimate from the route. - if reason == channeldb.FailureReasonIncorrectPaymentDetails { + if reason == channeldb.FailureReasonPaymentDetails { result.Route = rt } diff --git a/routing/result_interpretation.go b/routing/result_interpretation.go index 8f193048..03457619 100644 --- a/routing/result_interpretation.go +++ b/routing/result_interpretation.go @@ -11,7 +11,7 @@ import ( // Instantiate variables to allow taking a reference from the failure reason. var ( reasonError = channeldb.FailureReasonError - reasonIncorrectDetails = channeldb.FailureReasonIncorrectPaymentDetails + reasonIncorrectDetails = channeldb.FailureReasonPaymentDetails ) // pairResult contains the result of the interpretation of a payment attempt for