Merge pull request #3222 from joostjager/fix-cli
lncli: add resetmc and small fixes
This commit is contained in:
4 files changed
+35
-3
No files matched your search
@@ -14,6 +14,7 @@ import (
|
|||||||
var queryMissionControlCommand = cli.Command{
|
var queryMissionControlCommand = cli.Command{
|
||||||
Name: "querymc",
|
Name: "querymc",
|
||||||
Category: "Payments",
|
Category: "Payments",
|
||||||
|
Usage: "Query the internal mission control state.",
|
||||||
Action: actionDecorator(queryMissionControl),
|
Action: actionDecorator(queryMissionControl),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
// +build routerrpc
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
||||||
|
|
||||||
|
"github.com/urfave/cli"
|
||||||
|
)
|
||||||
|
|
||||||
|
var resetMissionControlCommand = cli.Command{
|
||||||
|
Name: "resetmc",
|
||||||
|
Category: "Payments",
|
||||||
|
Usage: "Reset internal mission control state.",
|
||||||
|
Action: actionDecorator(resetMissionControl),
|
||||||
|
}
|
||||||
|
|
||||||
|
func resetMissionControl(ctx *cli.Context) error {
|
||||||
|
conn := getClientConn(ctx, false)
|
||||||
|
defer conn.Close()
|
||||||
|
|
||||||
|
client := routerrpc.NewRouterClient(conn)
|
||||||
|
|
||||||
|
req := &routerrpc.ResetMissionControlRequest{}
|
||||||
|
rpcCtx := context.Background()
|
||||||
|
_, err := client.ResetMissionControl(rpcCtx, req)
|
||||||
|
return err
|
||||||
|
}
|
||||||
@@ -2363,8 +2363,9 @@ func payInvoice(ctx *cli.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var sendToRouteCommand = cli.Command{
|
var sendToRouteCommand = cli.Command{
|
||||||
Name: "sendtoroute",
|
Name: "sendtoroute",
|
||||||
Usage: "send a payment over a predefined route",
|
Category: "Payments",
|
||||||
|
Usage: "Send a payment over a predefined route.",
|
||||||
Description: `
|
Description: `
|
||||||
Send a payment over Lightning using a specific route. One must specify
|
Send a payment over Lightning using a specific route. One must specify
|
||||||
a list of routes to attempt and the payment hash. This command can even
|
a list of routes to attempt and the payment hash. This command can even
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ import "github.com/urfave/cli"
|
|||||||
|
|
||||||
// routerCommands will return nil for non-routerrpc builds.
|
// routerCommands will return nil for non-routerrpc builds.
|
||||||
func routerCommands() []cli.Command {
|
func routerCommands() []cli.Command {
|
||||||
return []cli.Command{queryMissionControlCommand}
|
return []cli.Command{queryMissionControlCommand, resetMissionControlCommand}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user