lncli/autopilot: add -ignorelocal state flag to query

This commit is contained in:
Johan T. Halseth 2019-03-18 14:58:19 +01:00
parent d4813422c9
commit 6aae6fda93
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

View File

@ -97,9 +97,16 @@ func disable(ctx *cli.Context) error {
var queryScoresCommand = cli.Command{
Name: "query",
Usage: "Query the autopilot heuristcs for nodes' scores.",
ArgsUsage: "<pubkey> <pubkey> <pubkey> ...",
ArgsUsage: "[flags] <pubkey> <pubkey> <pubkey> ...",
Description: "",
Action: actionDecorator(queryScores),
Flags: []cli.Flag{
cli.BoolFlag{
Name: "ignorelocalstate, i",
Usage: "Ignore local channel state when calculating " +
"scores.",
},
},
}
func queryScores(ctx *cli.Context) error {
@ -123,7 +130,8 @@ loop:
}
req := &autopilotrpc.QueryScoresRequest{
Pubkeys: pubs,
Pubkeys: pubs,
IgnoreLocalState: ctx.Bool("ignorelocalstate"),
}
resp, err := client.QueryScores(ctxb, req)