2019-06-19 10:22:18 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"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 {
|
2020-07-18 18:46:16 +03:00
|
|
|
ctxc := getContext()
|
2019-06-19 10:22:18 +03:00
|
|
|
conn := getClientConn(ctx, false)
|
|
|
|
defer conn.Close()
|
|
|
|
|
|
|
|
client := routerrpc.NewRouterClient(conn)
|
|
|
|
|
|
|
|
req := &routerrpc.ResetMissionControlRequest{}
|
2020-07-18 18:46:16 +03:00
|
|
|
_, err := client.ResetMissionControl(ctxc, req)
|
2019-06-19 10:22:18 +03:00
|
|
|
return err
|
|
|
|
}
|