cmd/lncli: observe the --force parameter in the closechannel command
This commit is contained in:
parent
a9f0caff87
commit
1a357755d7
@ -11,13 +11,13 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"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/lightningnetwork/lnd/lnrpc"
|
||||||
"github.com/roasbeef/btcd/wire"
|
"github.com/roasbeef/btcd/wire"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
"golang.org/x/net/context"
|
"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"
|
"github.com/BitfuryLightning/tools/rt/visualizer"
|
||||||
)
|
)
|
||||||
@ -285,7 +285,7 @@ var CloseChannelCommand = cli.Command{
|
|||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "force",
|
Name: "force",
|
||||||
Usage: "after the time limit has passed, attempted an " +
|
Usage: "after the time limit has passed, attempt an " +
|
||||||
"uncooperative closure",
|
"uncooperative closure",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
@ -305,11 +305,13 @@ func closeChannel(ctx *cli.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(roasbeef): implement time deadline within server
|
||||||
req := &lnrpc.CloseChannelRequest{
|
req := &lnrpc.CloseChannelRequest{
|
||||||
ChannelPoint: &lnrpc.ChannelPoint{
|
ChannelPoint: &lnrpc.ChannelPoint{
|
||||||
FundingTxid: txid[:],
|
FundingTxid: txid[:],
|
||||||
OutputIndex: uint32(ctx.Int("output_index")),
|
OutputIndex: uint32(ctx.Int("output_index")),
|
||||||
},
|
},
|
||||||
|
Force: ctx.Bool("force"),
|
||||||
}
|
}
|
||||||
|
|
||||||
stream, err := client.CloseChannel(ctxb, req)
|
stream, err := client.CloseChannel(ctxb, req)
|
||||||
|
Loading…
Reference in New Issue
Block a user