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

View File

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

View File

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