From 1a3be78471ef2394f67b62402417b35b6813274b Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Mon, 13 Mar 2023 12:45:58 +0100 Subject: [PATCH] cmd/lncli: add --num_confs to wallet psbt fund command --- cmd/lncli/walletrpc_active.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cmd/lncli/walletrpc_active.go b/cmd/lncli/walletrpc_active.go index abccb2b2c..7bae32fbf 100644 --- a/cmd/lncli/walletrpc_active.go +++ b/cmd/lncli/walletrpc_active.go @@ -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"), + Account: ctx.String("account"), + MinConfs: minConfs, + SpendUnconfirmed: minConfs == 0, } // Parse template flags.