lnrpc/autopilotrpc: add QueryScores API

Adds a new lnrpc API that lets the caller get ("dry run") the scores
that would be given to a set of node by the available autopilot
heuristics.
This commit is contained in:
Johan T. Halseth committed 2019-01-23 09:05:43 +01:00
1 parent 8f54a2bd6f
commit a654be5884
2 files changed
+219 -22

No files matched your search

+20
View File
@@ -18,6 +18,13 @@ service Autopilot {
enabling or disabling it.
*/
rpc ModifyStatus(ModifyStatusRequest) returns (ModifyStatusResponse);
/**
QueryScores queries all available autopilot heuristics, in addition to any
active combination of these heruristics, for the scores they would give to
the given nodes.
*/
rpc QueryScores(QueryScoresRequest) returns (QueryScoresResponse);
}
message StatusRequest{
@@ -34,3 +41,16 @@ message ModifyStatusRequest{
}
message ModifyStatusResponse {}
message QueryScoresRequest{
repeated string pubkeys = 1 [json_name = "pubkeys"];
}
message QueryScoresResponse {
message HeuristicResult {
string heuristic = 1 [json_name = "heuristic"];
map<string, double> scores= 2 [json_name = "scores"];
}
repeated HeuristicResult results = 1 [json_name = "results"];
}