walletrpc: allow conf_target=1 in EstimateFee

See https://github.com/lightningnetwork/lnd/pull/9611#issuecomment-3082770038
This commit is contained in:
Boris Nagaev committed 2025-08-01 17:15:09 -03:00
1 parent 37523b6cb7
commit b0e9a4b79f
1 file changed
+3 -5
+3 -5
View File
@@ -843,12 +843,10 @@ func (w *WalletKit) SendOutputs(ctx context.Context,
func (w *WalletKit) EstimateFee(ctx context.Context, func (w *WalletKit) EstimateFee(ctx context.Context,
req *EstimateFeeRequest) (*EstimateFeeResponse, error) { req *EstimateFeeRequest) (*EstimateFeeResponse, error) {
switch { // A confirmation target of zero or lower doesn't make any sense.
// A confirmation target of zero doesn't make any sense. Similarly, we if req.ConfTarget <= 0 {
// reject confirmation targets of 1 as they're unreasonable.
case req.ConfTarget == 0 || req.ConfTarget == 1:
return nil, fmt.Errorf("confirmation target must be greater " + return nil, fmt.Errorf("confirmation target must be greater " +
"than 1") "than 0")
} }
satPerKw, err := w.cfg.FeeEstimator.EstimateFeePerKW( satPerKw, err := w.cfg.FeeEstimator.EstimateFeePerKW(