diff --git a/lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs b/lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs index 1b431bee30b..9af1a7190a7 100644 --- a/lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs +++ b/lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs @@ -415,29 +415,6 @@ combineChainData registrationMap retirementMap prodMap metaMap = mRetirementCert = Map.lookup (view #poolId registrationCert) retirementMap --- TODO: --- --- This function currently executes a total of (2n + 1) database queries, where --- n is the total number of pools with entries in the pool registrations table. --- --- Specifically: --- --- 1. We first execute a query to determine the complete set of all pools --- (including those that may have retired). --- --- 2. For each pool, we determine its current life-cycle status by executing --- a pair of queries to fetch: --- --- a. The most recent registration certificate. --- b. The most recent retirement certificate. --- --- This is almost certainly not optimal. --- --- If performance becomes a problem, we should investigate ways to reduce the --- number of queries required: --- --- See: https://jira.iohk.io/browse/ADP-383 --- readPoolDbData :: DBLayer IO -> EpochNo -> IO (Map PoolId PoolDbData) readPoolDbData DBLayer {..} currentEpoch = atomically $ do lifeCycleData <- listPoolLifeCycleData currentEpoch