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')" , ")"