From f19b00c4c07cd2d6979b37baa175e0f1291660ef Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 11 Sep 2019 11:09:52 -0300 Subject: [PATCH] Fix error message for wrong size description_hash. --- lnrpc/invoicesrpc/addinvoice.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnrpc/invoicesrpc/addinvoice.go b/lnrpc/invoicesrpc/addinvoice.go index 055b564c..5685de77 100644 --- a/lnrpc/invoicesrpc/addinvoice.go +++ b/lnrpc/invoicesrpc/addinvoice.go @@ -159,8 +159,8 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig, "(maxsize=%v)", len(invoice.Receipt), channeldb.MaxReceiptSize) } if len(invoice.DescriptionHash) > 0 && len(invoice.DescriptionHash) != 32 { - return nil, nil, fmt.Errorf("description hash is %v bytes, must be %v", - len(invoice.DescriptionHash), channeldb.MaxPaymentRequestSize) + return nil, nil, fmt.Errorf("description hash is %v bytes, must be 32", + len(invoice.DescriptionHash)) } // The value of the invoice must not be negative.