feature/set: add SetInvoiceAmp

AMP invoices need to signal:
 - AMPRequired in order to avoid being paid by older clients that don't
   support it.
 - Can't advertised MPP optional, otherwise older clients will attempt
   to pay the invoice with regular MPP payment.

Hence, the features advertised on AMP invoices are mutually exclusive
from those advertised on MPP. Create a new set to classify the two.
This commit is contained in:
Conner Fromknecht 2021-05-06 09:14:20 -07:00
parent 9020a4d2a5
commit bbb841bd5f
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -22,6 +22,10 @@ const (
// SetInvoice identifies features that should be advertised on invoices // SetInvoice identifies features that should be advertised on invoices
// generated by the daemon. // generated by the daemon.
SetInvoice SetInvoice
// SetInvoiceAmp identifies the features that should be advertised on
// AMP invoices generated by the daemon.
SetInvoiceAmp
) )
// String returns a human-readable description of a Set. // String returns a human-readable description of a Set.
@ -35,6 +39,8 @@ func (s Set) String() string {
return "SetNodeAnn" return "SetNodeAnn"
case SetInvoice: case SetInvoice:
return "SetInvoice" return "SetInvoice"
case SetInvoiceAmp:
return "SetInvoiceAmp"
default: default:
return "SetUnknown" return "SetUnknown"
} }