diff --git a/api/management/commands/follow_invoices.py b/api/management/commands/follow_invoices.py index 33ce82d9..bea76ad7 100644 --- a/api/management/commands/follow_invoices.py +++ b/api/management/commands/follow_invoices.py @@ -58,15 +58,15 @@ class Command(BaseCommand): LND Background: SubscribeInvoices stub iterator would be great to use here. However, it only sends updates when the invoice is OPEN (new) or SETTLED. We are very interested on the other two states (CANCELLED and ACCEPTED). - Therefore, this thread (follow_invoices) will iterate over all LNpayment - objects and do InvoiceLookupV2 every X seconds to update their state 'live' + Therefore, this thread (follow_invoices) will iterate over all LNpayments in + INVGEN status and do InvoiceLookupV2 every X seconds to update their status. """ # time it for debugging t0 = time.time() queryset = LNPayment.objects.filter( type=LNPayment.Types.HOLD, - status__in=[LNPayment.Status.INVGEN, LNPayment.Status.LOCKED], + status=LNPayment.Status.INVGEN, ) debug = {}