From 149c2a0d200d59f638885e62154f38f5a79034e9 Mon Sep 17 00:00:00 2001 From: KtorZ Date: Sat, 27 Jun 2020 21:10:13 +0200 Subject: [PATCH] discard metadata URL based on their hash, not URLs --- lib/core/src/Cardano/Pool/DB/Sqlite.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/core/src/Cardano/Pool/DB/Sqlite.hs b/lib/core/src/Cardano/Pool/DB/Sqlite.hs index 70e96603127..66747e6162e 100644 --- a/lib/core/src/Cardano/Pool/DB/Sqlite.hs +++ b/lib/core/src/Cardano/Pool/DB/Sqlite.hs @@ -257,7 +257,6 @@ newDBLayer trace fp = do , unfetchedPoolMetadataRefs = \limit -> do let nLimit = T.pack (show limit) let metadataHash = fieldName (DBField PoolRegistrationMetadataHash) - let metadataUrl = fieldName (DBField PoolRegistrationMetadataUrl) let retryAfter = fieldName (DBField PoolFetchAttemptsRetryAfter) let registrations = tableName (DBField PoolRegistrationMetadataHash) let fetchAttempts = tableName (DBField PoolFetchAttemptsMetadataHash) @@ -273,9 +272,9 @@ newDBLayer trace fp = do , "FROM", metadata , ")" , "AND" - , metadataUrl, "NOT", "IN" -- Recently failed urls + , metadataHash, "NOT", "IN" -- Recently failed urls , "(" - , "SELECT", metadataUrl + , "SELECT", metadataHash , "FROM", fetchAttempts , "WHERE", retryAfter, ">=", "datetime('now')" , ")"