Add constant and percentage-based fee limits to payments

- Extend SendRequest and QueryRoutesRequest protos
- newRoute function takes fee limit and cuts off routes that exceed it
- queryRoutes, payInvoice and sendPayment commands take the feeLimit inputs and pass them down to newRoute
- When no feeLimit is included, don't enforce any feeLimits at all (by setting feeLimit to maxValue)
This commit is contained in:
Sebastian Delgado authored and Wilmer Paulino committed 2018-06-12 18:14:43 -07:00
1 parent 80b531db62
commit 6746609ec6
10 files changed
+537 -402

No files matched your search

+4
View File
@@ -42,6 +42,10 @@ const (
// ErrPaymentAttemptTimeout is an error that indicates that a payment
// attempt timed out before we were able to successfully route an HTLC.
ErrPaymentAttemptTimeout
// ErrFeeCutoffExceeded is returned when the total fees of a route
// exceed the user-specified maximum payment for the fee.
ErrFeeCutoffExceeded
)
// routerError is a structure that represent the error inside the routing package,