From c22768283cbc623d695c6d3f0c710b8207c91566 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Fri, 1 Aug 2025 17:12:15 -0300 Subject: [PATCH] walletrpc: allow conf_target=1 in FundPsbt Modified 'fund_psbt' itest to test this scenario. --- itest/lnd_psbt_test.go | 4 ++-- lnrpc/walletrpc/walletkit_server.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/itest/lnd_psbt_test.go b/itest/lnd_psbt_test.go index 6090784a0..4b2f9629a 100644 --- a/itest/lnd_psbt_test.go +++ b/itest/lnd_psbt_test.go @@ -1253,8 +1253,8 @@ func fundPsbtCoinSelect(t testing.TB, node *node.HarnessNode, Template: &walletrpc.FundPsbtRequest_CoinSelect{ CoinSelect: cs, }, - Fees: &walletrpc.FundPsbtRequest_SatPerVbyte{ - SatPerVbyte: 50, + Fees: &walletrpc.FundPsbtRequest_TargetConf{ + TargetConf: 1, }, }) diff --git a/lnrpc/walletrpc/walletkit_server.go b/lnrpc/walletrpc/walletkit_server.go index d92c09dff..9efc730a4 100644 --- a/lnrpc/walletrpc/walletkit_server.go +++ b/lnrpc/walletrpc/walletkit_server.go @@ -1555,9 +1555,9 @@ func (w *WalletKit) FundPsbt(_ context.Context, // Estimate the fee by the target number of blocks to confirmation. case req.GetTargetConf() != 0: targetConf := req.GetTargetConf() - if targetConf < 2 { + if targetConf < 1 { return nil, fmt.Errorf("confirmation target must be " + - "greater than 1") + "greater than 0") } feeSatPerKW, err = w.cfg.FeeEstimator.EstimateFeePerKW(