lncli: add option upfront shutdown to openchannel
This commit is contained in:
parent
a2f029caca
commit
c27d60b6d1
@ -590,6 +590,12 @@ var openChannelCommand = cli.Command{
|
||||
amount to the remote node as part of the channel opening. Once the channel is open,
|
||||
a channelPoint (txid:vout) of the funding output is returned.
|
||||
|
||||
If the remote peer supports the option upfront shutdown feature bit (query
|
||||
listpeers to see their supported feature bits), an address to enforce
|
||||
payout of funds on cooperative close can optionally be provided. Note that
|
||||
if you set this value, you will not be able to cooperatively close out to
|
||||
another address.
|
||||
|
||||
One can manually set the fee to be used for the funding transaction via either
|
||||
the --conf_target or --sat_per_byte arguments. This is optional.`,
|
||||
ArgsUsage: "node-key local-amt push-amt",
|
||||
@ -659,6 +665,13 @@ var openChannelCommand = cli.Command{
|
||||
"transaction must satisfy",
|
||||
Value: 1,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "close_address",
|
||||
Usage: "(optional) an address to enforce payout of our " +
|
||||
"funds to on cooperative close. Note that if this " +
|
||||
"value is set on channel open, you will *not* be " +
|
||||
"able to cooperatively close to a different address.",
|
||||
},
|
||||
},
|
||||
Action: actionDecorator(openChannel),
|
||||
}
|
||||
@ -686,6 +699,7 @@ func openChannel(ctx *cli.Context) error {
|
||||
RemoteCsvDelay: uint32(ctx.Uint64("remote_csv_delay")),
|
||||
MinConfs: minConfs,
|
||||
SpendUnconfirmed: minConfs == 0,
|
||||
CloseAddress: ctx.String("close_address"),
|
||||
}
|
||||
|
||||
switch {
|
||||
|
Loading…
Reference in New Issue
Block a user