Fix error message for wrong size description_hash.

This commit is contained in:
fiatjaf 2019-09-11 11:09:52 -03:00 committed by GitHub
parent 2dd23819bb
commit f19b00c4c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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.