invoicesrpc: fix route hint off-by-one-error

right now it is possible to add 21 route hints which results in an error.
This commit is contained in:
Otto Suess 2019-07-12 08:51:30 +02:00 committed by GitHub
parent 0193034f4f
commit c843835a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -268,7 +268,7 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig,
for _, channel := range openChannels { for _, channel := range openChannels {
// We'll restrict the number of individual route hints // We'll restrict the number of individual route hints
// to 20 to avoid creating overly large invoices. // to 20 to avoid creating overly large invoices.
if numHints > 20 { if numHints >= 20 {
break break
} }