mirror of
https://github.com/lightninglabs/aperture.git
synced 2026-01-31 15:14:26 +01:00
challenger: skip trying to load+parse AMP invoices
AMP invoiecs don't have a payment hash, as it's based on payment addr and set id.
This commit is contained in:
@@ -102,6 +102,12 @@ func (l *LndChallenger) Start() error {
|
||||
// updates for new invoices and/or newly settled invoices.
|
||||
l.invoicesMtx.Lock()
|
||||
for _, invoice := range invoiceResp.Invoices {
|
||||
// Some invoices like AMP invoices may not have a payment hash
|
||||
// populated.
|
||||
if invoice.RHash == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if invoice.AddIndex > addIndex {
|
||||
addIndex = invoice.AddIndex
|
||||
}
|
||||
@@ -207,6 +213,12 @@ func (l *LndChallenger) readInvoiceStream(
|
||||
default:
|
||||
}
|
||||
|
||||
// Some invoices like AMP invoices may not have a payment hash
|
||||
// populated.
|
||||
if invoice.RHash == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
hash, err := lntypes.MakeHash(invoice.RHash)
|
||||
if err != nil {
|
||||
log.Errorf("Error parsing invoice hash: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user