routing+channeldb: add more failure reasons
This commit is contained in:
7 files changed
+241
-167
No files matched your search
+12
-1
@@ -94,10 +94,17 @@ const (
|
||||
// destination was found during path finding.
|
||||
FailureReasonNoRoute FailureReason = 1
|
||||
|
||||
// FailureReasonError indicates that an unexpected error happened during
|
||||
// payment.
|
||||
FailureReasonError FailureReason = 2
|
||||
|
||||
// FailureReasonIncorrectPaymentDetails indicates that either the hash
|
||||
// is unknown or the final cltv delta or amount is incorrect.
|
||||
FailureReasonIncorrectPaymentDetails FailureReason = 3
|
||||
|
||||
// TODO(halseth): cancel state.
|
||||
|
||||
// TODO(joostjager): Add failure reasons for:
|
||||
// UnknownPaymentHash, FinalInvalidAmt, FinalInvalidCltv
|
||||
// LocalLiquidityInsufficient, RemoteCapacityInsufficient.
|
||||
)
|
||||
|
||||
@@ -108,6 +115,10 @@ func (r FailureReason) String() string {
|
||||
return "timeout"
|
||||
case FailureReasonNoRoute:
|
||||
return "no_route"
|
||||
case FailureReasonError:
|
||||
return "error"
|
||||
case FailureReasonIncorrectPaymentDetails:
|
||||
return "incorrect_payment_details"
|
||||
}
|
||||
|
||||
return "unknown"
|
||||
|
||||
Reference in new issue
Block a user