33 lines
653 B
Go
33 lines
653 B
Go
package main
|
|
|
|
import (
|
|
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
|
|
|
"github.com/urfave/cli"
|
|
)
|
|
|
|
var queryMissionControlCommand = cli.Command{
|
|
Name: "querymc",
|
|
Category: "Payments",
|
|
Usage: "Query the internal mission control state.",
|
|
Action: actionDecorator(queryMissionControl),
|
|
}
|
|
|
|
func queryMissionControl(ctx *cli.Context) error {
|
|
ctxc := getContext()
|
|
conn := getClientConn(ctx, false)
|
|
defer conn.Close()
|
|
|
|
client := routerrpc.NewRouterClient(conn)
|
|
|
|
req := &routerrpc.QueryMissionControlRequest{}
|
|
snapshot, err := client.QueryMissionControl(ctxc, req)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
printRespJSON(snapshot)
|
|
|
|
return nil
|
|
}
|