mirror of
https://github.com/RoboSats/robosats.git
synced 2024-09-11 14:05:51 +03:00
Fix clean onchain_payment, also deletes 'created' objects. Fix rewards timeout
This commit is contained in:
parent
4dff7efbb7
commit
b76b333413
@ -100,7 +100,7 @@ PROPORTIONAL_ROUTING_FEE_LIMIT = 0.001
|
||||
MIN_FLAT_ROUTING_FEE_LIMIT = 10
|
||||
MIN_FLAT_ROUTING_FEE_LIMIT_REWARD = 2
|
||||
# Routing timeouts
|
||||
REWARDS_TIMEOUT_SECONDS = 60
|
||||
REWARDS_TIMEOUT_SECONDS = 30
|
||||
PAYOUT_TIMEOUT_SECONDS = 90
|
||||
|
||||
# REVERSE SUBMARINE SWAP PAYOUTS
|
||||
|
@ -172,7 +172,7 @@ def payments_cleansing():
|
||||
"""
|
||||
Deletes cancelled payments (hodl invoices never locked) that
|
||||
belong to orders expired more than 3 days ago.
|
||||
Deletes cancelled onchain_payments
|
||||
Deletes 'cancelled' or 'create' onchain_payments
|
||||
"""
|
||||
|
||||
from django.db.models import Q
|
||||
@ -202,7 +202,7 @@ def payments_cleansing():
|
||||
pass
|
||||
|
||||
# same for onchain payments
|
||||
queryset = OnchainPayment.objects.filter(Q(status=OnchainPayment.Status.CANCE),
|
||||
queryset = OnchainPayment.objects.filter(Q(status__in=[OnchainPayment.Status.CANCE, OnchainPayment.Status.CREAT]),
|
||||
Q(order_paid_TX__expires_at__lt=finished_time))
|
||||
|
||||
# And do not have an active trade, any past contract or any reward.
|
||||
|
Loading…
Reference in New Issue
Block a user