mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 00:43:06 +02:00
Merge pull request #7510 from guggero/fund-psbt-unconfirmed
lncli: allow specifying `--min_confs` in `wallet psbt fund` to select unconfirmed inputs
This commit is contained in:
@@ -660,6 +660,13 @@ var fundPsbtCommand = cli.Command{
|
|||||||
"always use the coin selection key scope to " +
|
"always use the coin selection key scope to " +
|
||||||
"generate the change address",
|
"generate the change address",
|
||||||
},
|
},
|
||||||
|
cli.Uint64Flag{
|
||||||
|
Name: "min_confs",
|
||||||
|
Usage: "(optional) the minimum number of " +
|
||||||
|
"confirmations each input used for the PSBT " +
|
||||||
|
"transaction must satisfy",
|
||||||
|
Value: defaultUtxoMinConf,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Action: actionDecorator(fundPsbt),
|
Action: actionDecorator(fundPsbt),
|
||||||
}
|
}
|
||||||
@@ -673,8 +680,11 @@ func fundPsbt(ctx *cli.Context) error {
|
|||||||
return cli.ShowCommandHelp(ctx, "fund")
|
return cli.ShowCommandHelp(ctx, "fund")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
minConfs := int32(ctx.Uint64("min_confs"))
|
||||||
req := &walletrpc.FundPsbtRequest{
|
req := &walletrpc.FundPsbtRequest{
|
||||||
Account: ctx.String("account"),
|
Account: ctx.String("account"),
|
||||||
|
MinConfs: minConfs,
|
||||||
|
SpendUnconfirmed: minConfs == 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse template flags.
|
// Parse template flags.
|
||||||
|
7
docs/release-notes/release-notes-0.16.1.md
Normal file
7
docs/release-notes/release-notes-0.16.1.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Release Notes
|
||||||
|
|
||||||
|
## `lncli`
|
||||||
|
|
||||||
|
- The `lncli wallet psbt fund` command now allows users to specify the
|
||||||
|
[`--min_confs` flag](https://github.com/lightningnetwork/lnd/pull/7510).
|
||||||
|
|
Reference in New Issue
Block a user