mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 22:46:40 +01:00
lncli: fix psbt fund parameter parsing
The sat_per_vbyte parameter was ignored because of a default value for conf_target.
This commit is contained in:
parent
e62f0e1f3a
commit
9b1b92bf98
1 changed files with 6 additions and 5 deletions
|
@ -651,15 +651,16 @@ func fundPsbt(ctx *cli.Context) error {
|
||||||
return fmt.Errorf("cannot set conf_target and sat_per_vbyte " +
|
return fmt.Errorf("cannot set conf_target and sat_per_vbyte " +
|
||||||
"at the same time")
|
"at the same time")
|
||||||
|
|
||||||
case ctx.Uint64("conf_target") > 0:
|
|
||||||
req.Fees = &walletrpc.FundPsbtRequest_TargetConf{
|
|
||||||
TargetConf: uint32(ctx.Uint64("conf_target")),
|
|
||||||
}
|
|
||||||
|
|
||||||
case ctx.Uint64("sat_per_vbyte") > 0:
|
case ctx.Uint64("sat_per_vbyte") > 0:
|
||||||
req.Fees = &walletrpc.FundPsbtRequest_SatPerVbyte{
|
req.Fees = &walletrpc.FundPsbtRequest_SatPerVbyte{
|
||||||
SatPerVbyte: ctx.Uint64("sat_per_vbyte"),
|
SatPerVbyte: ctx.Uint64("sat_per_vbyte"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check conf_target last because it has a default value.
|
||||||
|
case ctx.Uint64("conf_target") > 0:
|
||||||
|
req.Fees = &walletrpc.FundPsbtRequest_TargetConf{
|
||||||
|
TargetConf: uint32(ctx.Uint64("conf_target")),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
walletClient, cleanUp := getWalletClient(ctx)
|
walletClient, cleanUp := getWalletClient(ctx)
|
||||||
|
|
Loading…
Add table
Reference in a new issue