mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
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{
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user