From b9aaf9f1bc45ca18e2523824f70a9468ee0f71ec Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Tue, 25 Apr 2023 03:13:28 -0700 Subject: [PATCH] Add permissioned payouts mode debugging envvar --- .env-sample | 1 + api/tasks.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.env-sample b/.env-sample index def417c8..fb5c3952 100644 --- a/.env-sample +++ b/.env-sample @@ -117,6 +117,7 @@ MIN_FLAT_ROUTING_FEE_LIMIT_REWARD = 2 # Routing timeouts REWARDS_TIMEOUT_SECONDS = 30 PAYOUT_TIMEOUT_SECONDS = 90 +DEBUG_PERMISSIONED_PAYOUTS = False # REVERSE SUBMARINE SWAP PAYOUTS # Disable on-the-fly swaps feature diff --git a/api/tasks.py b/api/tasks.py index 2b2a55a3..20f5c50d 100644 --- a/api/tasks.py +++ b/api/tasks.py @@ -84,6 +84,9 @@ def follow_send_payment(hash): from api.lightning.node import LNNode from api.models import LNPayment + if config("DEBUG_PERMISSIONED_PAYOUTS", cast=bool, default=False): + return + lnpayment = LNPayment.objects.get(payment_hash=hash) lnpayment.last_routing_time = timezone.now() lnpayment.save()