cmd/lncli: convert queryRoute to queryRoutes

This commit is contained in:
Olaoluwa Osuntokun 2017-03-20 19:01:57 -07:00
parent 04a6c2f7f6
commit dabaf9da70
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
2 changed files with 7 additions and 7 deletions

@ -1323,8 +1323,8 @@ func getNodeInfo(ctx *cli.Context) error {
return nil
}
var queryRouteCommand = cli.Command{
Name: "queryroute",
var queryRoutesCommand = cli.Command{
Name: "queryroutes",
Usage: "Query a route to a destination.",
Description: "Queries the channel router for a potential path to the destination that has sufficient flow for the amount including fees",
ArgsUsage: "dest amt",
@ -1339,10 +1339,10 @@ var queryRouteCommand = cli.Command{
Usage: "the amount to send expressed in satoshis",
},
},
Action: queryRoute,
Action: queryRoutes,
}
func queryRoute(ctx *cli.Context) error {
func queryRoutes(ctx *cli.Context) error {
ctxb := context.Background()
client, cleanUp := getClient(ctx)
defer cleanUp()
@ -1377,12 +1377,12 @@ func queryRoute(ctx *cli.Context) error {
return fmt.Errorf("amt argument missing")
}
req := &lnrpc.RouteRequest{
req := &lnrpc.QueryRoutesRequest{
PubKey: dest,
Amt: amt,
}
route, err := client.QueryRoute(ctxb, req)
route, err := client.QueryRoutes(ctxb, req)
if err != nil {
return err
}

@ -73,7 +73,7 @@ func main() {
describeGraphCommand,
getChanInfoCommand,
getNodeInfoCommand,
queryRouteCommand,
queryRoutesCommand,
getNetworkInfoCommand,
debugLevelCommand,
decodePayReqComamnd,