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.
This commit is contained in:
David Gumberg committed 2024-06-04 06:19:12 -04:00
1 parent 80b60d34aa
commit 4646afb366
1 file changed
+1 -1
+1 -1
View File
@@ -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,