lnrpc+routing: add edges and nodes restrictions to query routes

This commit allows the execution of QueryRoutes to be controlled using
lists of black-listed edges and nodes. Any path returned will not pass
through the edges and/or nodes on the list.
This commit is contained in:
Joost Jager committed 2019-03-06 15:30:57 +01:00
1 parent 4376f3e1bd
commit b09adc3219
8 files changed
+757 -595

No files matched your search

+648 -570
View File
File diff suppressed because it is too large. Load diff
+24
View File
@@ -1480,7 +1480,31 @@ message QueryRoutesRequest {
send the payment.
*/
FeeLimit fee_limit = 5;
/**
A list of nodes to ignore during path finding.
*/
repeated bytes ignored_nodes = 6;
/**
A list of edges to ignore during path finding.
*/
repeated EdgeLocator ignored_edges = 7;
}
message EdgeLocator {
/// The short channel id of this edge.
uint64 channel_id = 1;
/**
The direction of this edge. If direction_reverse is false, the direction
of this edge is from the channel endpoint with the lexicographically smaller
pub key to the endpoint with the larger pub key. If direction_reverse is
is true, the edge goes the other way.
*/
bool direction_reverse = 2;
}
message QueryRoutesResponse {
repeated Route routes = 1 [json_name = "routes"];
}
+11
View File
@@ -593,6 +593,17 @@
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "ignored_nodes",
"description": "*\nA list of nodes to ignore during path finding.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string",
"format": "byte"
}
}
],
"tags": [