From bbb841bd5f153e695ae9cb99bbea7bdf1e5544a9 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Thu, 6 May 2021 09:14:20 -0700 Subject: [PATCH] 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. --- feature/set.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/feature/set.go b/feature/set.go index 2ac2ce52..435fac1a 100644 --- a/feature/set.go +++ b/feature/set.go @@ -22,6 +22,10 @@ const ( // SetInvoice identifies features that should be advertised on invoices // generated by the daemon. 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. @@ -35,6 +39,8 @@ func (s Set) String() string { return "SetNodeAnn" case SetInvoice: return "SetInvoice" + case SetInvoiceAmp: + return "SetInvoiceAmp" default: return "SetUnknown" }