mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
cmd/lncli: add --num_confs to wallet psbt fund command
This commit is contained in:
parent
fe24f195b8
commit
1a3be78471
1 changed files with 11 additions and 1 deletions
|
@ -660,6 +660,13 @@ var fundPsbtCommand = cli.Command{
|
|||
"always use the coin selection key scope to " +
|
||||
"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),
|
||||
}
|
||||
|
@ -673,8 +680,11 @@ func fundPsbt(ctx *cli.Context) error {
|
|||
return cli.ShowCommandHelp(ctx, "fund")
|
||||
}
|
||||
|
||||
minConfs := int32(ctx.Uint64("min_confs"))
|
||||
req := &walletrpc.FundPsbtRequest{
|
||||
Account: ctx.String("account"),
|
||||
MinConfs: minConfs,
|
||||
SpendUnconfirmed: minConfs == 0,
|
||||
}
|
||||
|
||||
// Parse template flags.
|
||||
|
|
Loading…
Add table
Reference in a new issue