lncli/autopilot: add -ignorelocal state flag to query
This commit is contained in:
parent
d4813422c9
commit
6aae6fda93
@ -97,9 +97,16 @@ func disable(ctx *cli.Context) error {
|
|||||||
var queryScoresCommand = cli.Command{
|
var queryScoresCommand = cli.Command{
|
||||||
Name: "query",
|
Name: "query",
|
||||||
Usage: "Query the autopilot heuristcs for nodes' scores.",
|
Usage: "Query the autopilot heuristcs for nodes' scores.",
|
||||||
ArgsUsage: "<pubkey> <pubkey> <pubkey> ...",
|
ArgsUsage: "[flags] <pubkey> <pubkey> <pubkey> ...",
|
||||||
Description: "",
|
Description: "",
|
||||||
Action: actionDecorator(queryScores),
|
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 {
|
func queryScores(ctx *cli.Context) error {
|
||||||
@ -123,7 +130,8 @@ loop:
|
|||||||
}
|
}
|
||||||
|
|
||||||
req := &autopilotrpc.QueryScoresRequest{
|
req := &autopilotrpc.QueryScoresRequest{
|
||||||
Pubkeys: pubs,
|
Pubkeys: pubs,
|
||||||
|
IgnoreLocalState: ctx.Bool("ignorelocalstate"),
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := client.QueryScores(ctxb, req)
|
resp, err := client.QueryScores(ctxb, req)
|
||||||
|
Loading…
Reference in New Issue
Block a user