Skip to content

Commit 7dc6bd6

Browse files
committed
walletrpc: allow conf_target=1 in EstimateFee
See lightningnetwork#9611 (comment)
1 parent 47e9f05 commit 7dc6bd6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lnrpc/walletrpc/walletkit_server.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -843,12 +843,10 @@ func (w *WalletKit) SendOutputs(ctx context.Context,
843843
func (w *WalletKit) EstimateFee(ctx context.Context,
844844
req *EstimateFeeRequest) (*EstimateFeeResponse, error) {
845845

846-
switch {
847-
// A confirmation target of zero doesn't make any sense. Similarly, we
848-
// reject confirmation targets of 1 as they're unreasonable.
849-
case req.ConfTarget == 0 || req.ConfTarget == 1:
846+
// A confirmation target of zero or lower doesn't make any sense.
847+
if req.ConfTarget <= 0 {
850848
return nil, fmt.Errorf("confirmation target must be greater " +
851-
"than 1")
849+
"than 0")
852850
}
853851

854852
satPerKw, err := w.cfg.FeeEstimator.EstimateFeePerKW(

0 commit comments

Comments
 (0)