From c843835a05d404a1e18b87bfc10c6e81f512cfd4 Mon Sep 17 00:00:00 2001 From: Otto Suess <37940680+ottosuess@users.noreply.github.com> Date: Fri, 12 Jul 2019 08:51:30 +0200 Subject: [PATCH] invoicesrpc: fix route hint off-by-one-error right now it is possible to add 21 route hints which results in an error. --- 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 bedeefc8..c79b60b8 100644 --- a/lnrpc/invoicesrpc/addinvoice.go +++ b/lnrpc/invoicesrpc/addinvoice.go @@ -268,7 +268,7 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig, for _, channel := range openChannels { // We'll restrict the number of individual route hints // to 20 to avoid creating overly large invoices. - if numHints > 20 { + if numHints >= 20 { break }