diff --git a/channeldb/invoices.go b/channeldb/invoices.go index 2dcd1be8..fbec1a39 100644 --- a/channeldb/invoices.go +++ b/channeldb/invoices.go @@ -719,7 +719,12 @@ func validateInvoice(i *Invoice, paymentHash lntypes.Hash) error { return err } - if i.Terms.PaymentPreimage == nil && !i.HodlInvoice { + // AMP invoices and hodl invoices are allowed to have no preimage + // specified. + isAMP := i.Terms.Features.HasFeature( + lnwire.AMPOptional, + ) + if i.Terms.PaymentPreimage == nil && !(i.HodlInvoice || isAMP) { return errors.New("non-hodl invoices must have a preimage") }