Skip to content

Commit

Permalink
Remove redundant comment referring to technical debt.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Sep 4, 2020
1 parent 767a4ff commit 6230e05
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6230e05

Please sign in to comment.