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

+13
View File
@@ -474,6 +474,14 @@
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "fee_limit",
"description": "/ The maximum total fees for the route in satoshis.",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
}
],
"tags": [
@@ -2381,6 +2389,11 @@
"type": "integer",
"format": "int32",
"description": "/ The CLTV delta from the current height that should be used to set the timelock for the final hop."
},
"fee_limit": {
"type": "string",
"format": "int64",
"description": "/ The maximum total fees for the payment in satoshis."
}
}
},