From b0e9a4b79f6429dd444f8dccd0a7be77f2e47360 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Thu, 17 Jul 2025 11:18:56 -0300 Subject: [PATCH] walletrpc: allow conf_target=1 in EstimateFee See https://github.com/lightningnetwork/lnd/pull/9611#issuecomment-3082770038 --- lnrpc/walletrpc/walletkit_server.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lnrpc/walletrpc/walletkit_server.go b/lnrpc/walletrpc/walletkit_server.go index e8f0a79e5..d92c09dff 100644 --- a/lnrpc/walletrpc/walletkit_server.go +++ b/lnrpc/walletrpc/walletkit_server.go @@ -843,12 +843,10 @@ func (w *WalletKit) SendOutputs(ctx context.Context, func (w *WalletKit) EstimateFee(ctx context.Context, req *EstimateFeeRequest) (*EstimateFeeResponse, error) { - switch { - // A confirmation target of zero doesn't make any sense. Similarly, we - // reject confirmation targets of 1 as they're unreasonable. - case req.ConfTarget == 0 || req.ConfTarget == 1: + // A confirmation target of zero or lower doesn't make any sense. + if req.ConfTarget <= 0 { return nil, fmt.Errorf("confirmation target must be greater " + - "than 1") + "than 0") } satPerKw, err := w.cfg.FeeEstimator.EstimateFeePerKW(