From 4646afb366f9cb0da6a5ee0a940291888d491bae Mon Sep 17 00:00:00 2001 From: David Gumberg Date: Mon, 19 Feb 2024 12:04:43 -0500 Subject: [PATCH] lnrpc: Fix bug in 'cltv below minimum' error msg Previously the error message produced when `CltvExpiry` is less than the minimum final cltv (18 at present) set by `routing.MinCLTVDelta` inserted the values into the wrong spots of the formatted string. --- lnrpc/invoicesrpc/addinvoice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnrpc/invoicesrpc/addinvoice.go b/lnrpc/invoicesrpc/addinvoice.go index 3e20ebf62..4b55f3f0d 100644 --- a/lnrpc/invoicesrpc/addinvoice.go +++ b/lnrpc/invoicesrpc/addinvoice.go @@ -367,7 +367,7 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig, if invoice.CltvExpiry < routing.MinCLTVDelta { return nil, nil, fmt.Errorf("CLTV delta of %v must be "+ "greater than minimum of %v", - routing.MinCLTVDelta, invoice.CltvExpiry) + invoice.CltvExpiry, routing.MinCLTVDelta) } options = append(options,