cmd/lncli: properly spend unconfirmed utxos with openchannel

This commit is contained in:
Wilmer Paulino 2019-05-17 13:09:26 -07:00
parent 27ae22fa6c
commit 8628019ca2
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F

@ -675,12 +675,14 @@ func openChannel(ctx *cli.Context) error {
return nil
}
minConfs := int32(ctx.Uint64("min_confs"))
req := &lnrpc.OpenChannelRequest{
TargetConf: int32(ctx.Int64("conf_target")),
SatPerByte: ctx.Int64("sat_per_byte"),
MinHtlcMsat: ctx.Int64("min_htlc_msat"),
RemoteCsvDelay: uint32(ctx.Uint64("remote_csv_delay")),
MinConfs: int32(ctx.Uint64("min_confs")),
TargetConf: int32(ctx.Int64("conf_target")),
SatPerByte: ctx.Int64("sat_per_byte"),
MinHtlcMsat: ctx.Int64("min_htlc_msat"),
RemoteCsvDelay: uint32(ctx.Uint64("remote_csv_delay")),
MinConfs: minConfs,
SpendUnconfirmed: minConfs == 0,
}
switch {