cmd/lncli: add --num_max_routes to queryroutes, default to 10

This commit is contained in:
Olaoluwa Osuntokun 2018-02-12 16:29:34 -08:00
parent 1879130f64
commit 452d12809e
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 8 additions and 2 deletions

View File

@ -1721,6 +1721,11 @@ var queryRoutesCommand = cli.Command{
Name: "amt",
Usage: "the amount to send expressed in satoshis",
},
cli.Int64Flag{
Name: "num_max_routes",
Usage: "the max number of routes to be returned (default: 10)",
Value: 10,
},
},
Action: actionDecorator(queryRoutes),
}
@ -1761,8 +1766,9 @@ func queryRoutes(ctx *cli.Context) error {
}
req := &lnrpc.QueryRoutesRequest{
PubKey: dest,
Amt: amt,
PubKey: dest,
Amt: amt,
NumRoutes: int32(ctx.Int("num_max_routes")),
}
route, err := client.QueryRoutes(ctxb, req)