Merge pull request #3491 from fiatjaf/patch-1

Fix error message for wrong size description_hash.
This commit is contained in:
Johan T. Halseth authored and GitHub committed 2019-09-12 21:08:02 +02:00
commit 8f74ec2f1a
1 file changed
+2 -2
+2 -2
View File
@@ -159,8 +159,8 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig,
"(maxsize=%v)", len(invoice.Receipt), channeldb.MaxReceiptSize) "(maxsize=%v)", len(invoice.Receipt), channeldb.MaxReceiptSize)
} }
if len(invoice.DescriptionHash) > 0 && len(invoice.DescriptionHash) != 32 { if len(invoice.DescriptionHash) > 0 && len(invoice.DescriptionHash) != 32 {
return nil, nil, fmt.Errorf("description hash is %v bytes, must be %v", return nil, nil, fmt.Errorf("description hash is %v bytes, must be 32",
len(invoice.DescriptionHash), channeldb.MaxPaymentRequestSize) len(invoice.DescriptionHash))
} }
// The value of the invoice must not be negative. // The value of the invoice must not be negative.