Merge pull request #3749 from joostjager/extended-routing-failures

routing: local balance check before path finding
This commit is contained in:
Joost Jager authored and GitHub committed 2019-12-04 12:17:17 +01:00
commit 883f9e5f9a
9 files changed
+307 -186

No files matched your search

+6
View File
@@ -105,6 +105,10 @@ const (
// or the final cltv delta or amount is incorrect.
FailureReasonPaymentDetails FailureReason = 3
// FailureReasonInsufficientBalance indicates that we didn't have enough
// balance to complete the payment.
FailureReasonInsufficientBalance FailureReason = 4
// TODO(halseth): cancel state.
// TODO(joostjager): Add failure reasons for:
@@ -122,6 +126,8 @@ func (r FailureReason) String() string {
return "error"
case FailureReasonPaymentDetails:
return "incorrect_payment_details"
case FailureReasonInsufficientBalance:
return "insufficient_balance"
}
return "unknown"