Skip to content

Commit 990ba21

Browse files
committed
Remove unused query
1 parent f51217f commit 990ba21

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

cardano-db/src/Cardano/Db/Query.hs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ module Cardano.Db.Query (
2626
queryShelleyGenesisSupply,
2727
queryLatestBlock,
2828
queryLatestPoints,
29-
queryAddressWithReward,
3029
queryLatestEpochNo,
3130
queryLatestBlockId,
3231
queryLatestSlotNo,
@@ -160,7 +159,6 @@ import Database.Esqueleto.Experimental (
160159
count,
161160
countRows,
162161
desc,
163-
distinct,
164162
entityKey,
165163
entityVal,
166164
from,
@@ -504,20 +502,6 @@ queryLatestPoints = do
504502
pure (blk ^. BlockSlotNo, blk ^. BlockHash)
505503
pure $ fmap unValue2 res
506504

507-
-- This is an expensive query, but it is only used once when initiating the cStake LRU cache.
508-
-- The idea being to get a list of current registered stake addresses using rewards.
509-
queryAddressWithReward :: MonadIO m => Int -> ReaderT SqlBackend m [(ByteString, StakeAddressId)]
510-
queryAddressWithReward limitNumber = do
511-
res <- select $ distinct $ do
512-
(stk :& _) <-
513-
from
514-
$ table @StakeAddress
515-
`innerJoin` table @Reward
516-
`on` (\(stk :& rwd) -> stk ^. StakeAddressId ==. rwd ^. RewardAddrId)
517-
limit $ fromIntegral limitNumber
518-
pure (stk ^. StakeAddressHashRaw, stk ^. StakeAddressId)
519-
pure $ fmap (\(Value hashRaw, Value stakeAddressId) -> (hashRaw, stakeAddressId)) res
520-
521505
queryLatestEpochNo :: MonadIO m => ReaderT SqlBackend m Word64
522506
queryLatestEpochNo = do
523507
res <- select $ do

doc/configuration.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ This is equivalent to setting:
113113
},
114114
"governance": "disable",
115115
"offchain_pool_data": "disable"
116+
"pool_stat": "disable"
116117
```
117118

118119
Initially populates only a few tables, like `block` and `tx`. It maintains a ledger state but
@@ -141,6 +142,7 @@ This is equivalent to setting:
141142
},
142143
"governance": "enable",
143144
"offchain_pool_data": "disable"
145+
"pool_stat": "disable"
144146
145147
```
146148

@@ -167,6 +169,7 @@ This is equivalent to setting:
167169
},
168170
"governance": "disable",
169171
"offchain_pool_data": "disable"
172+
"pool_stat": "disable"
170173
```
171174

172175
Disables almost all data except `block` and `tx` tables.

0 commit comments

Comments
 (0)