lnrpc/invoicesrpc: expose new lookup modifier to LookupInvoiceV2

This commit is contained in:
Olaoluwa Osuntokun committed 2021-10-28 15:50:17 -07:00
1 parent a4f8842831
commit d8ce00e016
4 files changed
+199 -60

No files matched your search

+16
View File
@@ -393,12 +393,28 @@ func (s *Server) LookupInvoiceV2(ctx context.Context,
invoiceRef = channeldb.InvoiceRefByHash(payHash)
case req.GetPaymentAddr() != nil &&
req.LookupModifier == LookupModifier_HTLC_SET_BLANK:
var payAddr [32]byte
copy(payAddr[:], req.GetPaymentAddr())
invoiceRef = channeldb.InvoiceRefByAddrBlankHtlc(payAddr)
case req.GetPaymentAddr() != nil:
var payAddr [32]byte
copy(payAddr[:], req.GetPaymentAddr())
invoiceRef = channeldb.InvoiceRefByAddr(payAddr)
case req.GetSetId() != nil &&
req.LookupModifier == LookupModifier_HTLC_SET_ONLY:
var setID [32]byte
copy(setID[:], req.GetSetId())
invoiceRef = channeldb.InvoiceRefBySetIDFiltered(setID)
case req.GetSetId() != nil:
var setID [32]byte
copy(setID[:], req.GetSetId())