cmd/lncli: add new getdebuginfo command
This commit is contained in:
2 files changed
+30
No files matched your search
@@ -0,0 +1,29 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/lightningnetwork/lnd/lnrpc"
|
||||||
|
"github.com/urfave/cli"
|
||||||
|
)
|
||||||
|
|
||||||
|
var getDebugInfoCommand = cli.Command{
|
||||||
|
Name: "getdebuginfo",
|
||||||
|
Category: "Debug",
|
||||||
|
Usage: "Returns debug information related to the active daemon.",
|
||||||
|
Action: actionDecorator(getDebugInfo),
|
||||||
|
}
|
||||||
|
|
||||||
|
func getDebugInfo(ctx *cli.Context) error {
|
||||||
|
ctxc := getContext()
|
||||||
|
client, cleanUp := getClient(ctx)
|
||||||
|
defer cleanUp()
|
||||||
|
|
||||||
|
req := &lnrpc.GetDebugInfoRequest{}
|
||||||
|
resp, err := client.GetDebugInfo(ctxc, req)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
printRespJSON(resp)
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -459,6 +459,7 @@ func main() {
|
|||||||
walletBalanceCommand,
|
walletBalanceCommand,
|
||||||
channelBalanceCommand,
|
channelBalanceCommand,
|
||||||
getInfoCommand,
|
getInfoCommand,
|
||||||
|
getDebugInfoCommand,
|
||||||
getRecoveryInfoCommand,
|
getRecoveryInfoCommand,
|
||||||
pendingChannelsCommand,
|
pendingChannelsCommand,
|
||||||
sendPaymentCommand,
|
sendPaymentCommand,
|
||||||
|
|||||||
Reference in new issue
Block a user