From 547a7212a0651535ea655917d4f61e57cc073bc4 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sat, 20 May 2023 07:52:30 -0700 Subject: [PATCH] Do not watch all locked invoices in follow-invoices --- api/management/commands/follow_invoices.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 = {}