From 452d12809e04c123abd110b766fea329b3c35aba Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 12 Feb 2018 16:29:34 -0800 Subject: [PATCH] cmd/lncli: add --num_max_routes to queryroutes, default to 10 --- cmd/lncli/commands.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go index 5647db7d..00316920 100644 --- a/cmd/lncli/commands.go +++ b/cmd/lncli/commands.go @@ -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)