Merge pull request #3093 from wpaulino/lncli-openchannel-unconfirmed

cmd/lncli: properly spend unconfirmed utxos with openchannel
This commit is contained in:
Olaoluwa Osuntokun 2019-05-20 18:07:04 -07:00 committed by GitHub
commit 57715b5192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 {