From ef3aa84c10af9083ad26f0a08f7c071eb4ccca0e Mon Sep 17 00:00:00 2001 From: Jesse de Wit Date: Thu, 25 Jan 2024 20:56:51 +0100 Subject: [PATCH] lncli: add include_raw_tx flag to pendingchannels --- cmd/lncli/commands.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go index 076d5a43b..8d68c4cdf 100644 --- a/cmd/lncli/commands.go +++ b/cmd/lncli/commands.go @@ -1445,7 +1445,14 @@ var pendingChannelsCommand = cli.Command{ Name: "pendingchannels", Category: "Channels", Usage: "Display information pertaining to pending channels.", - Action: actionDecorator(pendingChannels), + Flags: []cli.Flag{ + cli.BoolFlag{ + Name: "include_raw_tx", + Usage: "include the raw transaction hex for " + + "waiting_close_channels.", + }, + }, + Action: actionDecorator(pendingChannels), } func pendingChannels(ctx *cli.Context) error { @@ -1453,7 +1460,10 @@ func pendingChannels(ctx *cli.Context) error { client, cleanUp := getClient(ctx) defer cleanUp() - req := &lnrpc.PendingChannelsRequest{} + includeRawTx := ctx.Bool("include_raw_tx") + req := &lnrpc.PendingChannelsRequest{ + IncludeRawTx: includeRawTx, + } resp, err := client.PendingChannels(ctxc, req) if err != nil { return err