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 2024-02-19 12:04:43 -05:00
parent 80b60d34aa
commit 4646afb366

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,