From 174d288e66951ae6ac7e6c65a4f180ecfabb9335 Mon Sep 17 00:00:00 2001
From: Justine Tunney <jtunney@gmail.com>
Date: Tue, 4 Oct 2022 10:22:08 -0700
Subject: [PATCH] Tune claim SQL query

---
 net/turfwar/turfwar.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/turfwar/turfwar.c b/net/turfwar/turfwar.c
index 7c6fa989b..16c8f64a0 100644
--- a/net/turfwar/turfwar.c
+++ b/net/turfwar/turfwar.c
@@ -1194,8 +1194,8 @@ StartOver:
                               "ON CONFLICT (ip) DO\n"
                               "UPDATE SET (nick, created) = (?2, ?3)\n"
                               "WHERE nick != ?2\n"
-                              "  AND (created IS NULL\n"
-                              "   OR  (?3 - created) > 3600)",
+                              "   OR created IS NULL\n"
+                              "   OR ?3 - created > 3600",
                               -1, &stmt, 0));
   LOG("ClaimWorker started\n");
   while ((n = GetClaims(&g_claims, v, BATCH_MAX, nsync_time_no_deadline))) {