mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-11 06:37:21 +01:00
lncli: add include_raw_tx flag to pendingchannels
This commit is contained in:
@@ -1445,6 +1445,13 @@ var pendingChannelsCommand = cli.Command{
|
|||||||
Name: "pendingchannels",
|
Name: "pendingchannels",
|
||||||
Category: "Channels",
|
Category: "Channels",
|
||||||
Usage: "Display information pertaining to pending channels.",
|
Usage: "Display information pertaining to pending channels.",
|
||||||
|
Flags: []cli.Flag{
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "include_raw_tx",
|
||||||
|
Usage: "include the raw transaction hex for " +
|
||||||
|
"waiting_close_channels.",
|
||||||
|
},
|
||||||
|
},
|
||||||
Action: actionDecorator(pendingChannels),
|
Action: actionDecorator(pendingChannels),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1453,7 +1460,10 @@ func pendingChannels(ctx *cli.Context) error {
|
|||||||
client, cleanUp := getClient(ctx)
|
client, cleanUp := getClient(ctx)
|
||||||
defer cleanUp()
|
defer cleanUp()
|
||||||
|
|
||||||
req := &lnrpc.PendingChannelsRequest{}
|
includeRawTx := ctx.Bool("include_raw_tx")
|
||||||
|
req := &lnrpc.PendingChannelsRequest{
|
||||||
|
IncludeRawTx: includeRawTx,
|
||||||
|
}
|
||||||
resp, err := client.PendingChannels(ctxc, req)
|
resp, err := client.PendingChannels(ctxc, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user