From 642cad9ed8972eb23b1f5bc6f80c933b22a9444d Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Sat, 25 Mar 2023 03:08:54 +0100 Subject: [PATCH] add max relays --- tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 715823b..12fdfa4 100644 --- a/tasks.py +++ b/tasks.py @@ -125,7 +125,9 @@ async def on_invoice_paid(payment: Payment): # send zap receipt to relays in zap request relays = get_tag(event_json, "relays") if relays: - for i, r in enumerate(relays): + if len(relays) > 50: + relays = relays[:50] + for r in relays: ws, wst = send_zap(r) wss += [ws] wsts += [wst]