cmd/lncli: observe the --force parameter in the closechannel command

This commit is contained in:
Olaoluwa Osuntokun 2016-09-12 12:28:28 -07:00
parent a9f0caff87
commit 1a357755d7
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -11,13 +11,13 @@ import (
"path/filepath"
"strings"
"github.com/BitfuryLightning/tools/prefix_tree"
"github.com/BitfuryLightning/tools/rt"
"github.com/BitfuryLightning/tools/rt/graph"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/roasbeef/btcd/wire"
"github.com/urfave/cli"
"golang.org/x/net/context"
"github.com/BitfuryLightning/tools/rt"
"github.com/BitfuryLightning/tools/prefix_tree"
"github.com/BitfuryLightning/tools/rt/graph"
"github.com/BitfuryLightning/tools/rt/visualizer"
)
@ -285,7 +285,7 @@ var CloseChannelCommand = cli.Command{
},
cli.BoolFlag{
Name: "force",
Usage: "after the time limit has passed, attempted an " +
Usage: "after the time limit has passed, attempt an " +
"uncooperative closure",
},
cli.BoolFlag{
@ -305,11 +305,13 @@ func closeChannel(ctx *cli.Context) error {
return err
}
// TODO(roasbeef): implement time deadline within server
req := &lnrpc.CloseChannelRequest{
ChannelPoint: &lnrpc.ChannelPoint{
FundingTxid: txid[:],
OutputIndex: uint32(ctx.Int("output_index")),
},
Force: ctx.Bool("force"),
}
stream, err := client.CloseChannel(ctxb, req)