walletrpc: allow conf_target=1 in FundPsbt

Modified 'fund_psbt' itest to test this scenario.
This commit is contained in:
Boris Nagaev committed 2025-08-01 17:16:02 -03:00
1 parent cd6e648a7f
commit c22768283c
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -1253,8 +1253,8 @@ func fundPsbtCoinSelect(t testing.TB, node *node.HarnessNode,
Template: &walletrpc.FundPsbtRequest_CoinSelect{ Template: &walletrpc.FundPsbtRequest_CoinSelect{
CoinSelect: cs, CoinSelect: cs,
}, },
Fees: &walletrpc.FundPsbtRequest_SatPerVbyte{ Fees: &walletrpc.FundPsbtRequest_TargetConf{
SatPerVbyte: 50, TargetConf: 1,
}, },
}) })
+2 -2
View File
@@ -1555,9 +1555,9 @@ func (w *WalletKit) FundPsbt(_ context.Context,
// Estimate the fee by the target number of blocks to confirmation. // Estimate the fee by the target number of blocks to confirmation.
case req.GetTargetConf() != 0: case req.GetTargetConf() != 0:
targetConf := req.GetTargetConf() targetConf := req.GetTargetConf()
if targetConf < 2 { if targetConf < 1 {
return nil, fmt.Errorf("confirmation target must be " + return nil, fmt.Errorf("confirmation target must be " +
"greater than 1") "greater than 0")
} }
feeSatPerKW, err = w.cfg.FeeEstimator.EstimateFeePerKW( feeSatPerKW, err = w.cfg.FeeEstimator.EstimateFeePerKW(