Skip to content

Commit 9fe1d23

Browse files
committed
rename CacheNew to CacheUpdateAction
1 parent f4f9085 commit 9fe1d23

File tree

9 files changed

+110
-110
lines changed

9 files changed

+110
-110
lines changed

cardano-db-sync/src/Cardano/DbSync/Cache.hs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import Cardano.BM.Trace
3030
import qualified Cardano.Db as DB
3131
import Cardano.DbSync.Cache.Epoch (rollbackMapEpochInCache)
3232
import qualified Cardano.DbSync.Cache.LRU as LRU
33-
import Cardano.DbSync.Cache.Types (CacheInternal (..), CacheNew (..), CacheStatistics (..), CacheStatus (..), StakeAddrCache, initCacheStatistics)
33+
import Cardano.DbSync.Cache.Types (CacheInternal (..), CacheStatistics (..), CacheStatus (..), CacheUpdateAction (..), StakeAddrCache, initCacheStatistics)
3434
import qualified Cardano.DbSync.Era.Shelley.Generic.Util as Generic
3535
import Cardano.DbSync.Era.Shelley.Query
3636
import Cardano.DbSync.Era.Util
@@ -84,24 +84,24 @@ getCacheStatistics cs =
8484
queryOrInsertRewardAccount ::
8585
(MonadBaseControl IO m, MonadIO m) =>
8686
CacheStatus ->
87-
CacheNew ->
87+
CacheUpdateAction ->
8888
Ledger.RewardAccount StandardCrypto ->
8989
ReaderT SqlBackend m DB.StakeAddressId
90-
queryOrInsertRewardAccount cacheStatus cacheNew rewardAddr = do
91-
eiAddrId <- queryRewardAccountWithCacheRetBs cacheStatus cacheNew rewardAddr
90+
queryOrInsertRewardAccount cacheStatus cacheUA rewardAddr = do
91+
eiAddrId <- queryRewardAccountWithCacheRetBs cacheStatus cacheUA rewardAddr
9292
case eiAddrId of
9393
Left (_err, bs) -> insertStakeAddress rewardAddr (Just bs)
9494
Right addrId -> pure addrId
9595

9696
queryOrInsertStakeAddress ::
9797
(MonadBaseControl IO m, MonadIO m) =>
9898
CacheStatus ->
99-
CacheNew ->
99+
CacheUpdateAction ->
100100
Network ->
101101
StakeCred ->
102102
ReaderT SqlBackend m DB.StakeAddressId
103-
queryOrInsertStakeAddress cacheStatus cacheNew nw cred =
104-
queryOrInsertRewardAccount cacheStatus cacheNew $ Ledger.RewardAccount nw cred
103+
queryOrInsertStakeAddress cacheStatus cacheUA nw cred =
104+
queryOrInsertRewardAccount cacheStatus cacheUA $ Ledger.RewardAccount nw cred
105105

106106
-- If the address already exists in the table, it will not be inserted again (due to
107107
-- the uniqueness constraint) but the function will return the 'StakeAddressId'.
@@ -124,73 +124,73 @@ queryRewardAccountWithCacheRetBs ::
124124
forall m.
125125
MonadIO m =>
126126
CacheStatus ->
127-
CacheNew ->
127+
CacheUpdateAction ->
128128
Ledger.RewardAccount StandardCrypto ->
129129
ReaderT SqlBackend m (Either (DB.LookupFail, ByteString) DB.StakeAddressId)
130-
queryRewardAccountWithCacheRetBs cacheStatus cacheNew rwdAcc =
131-
queryStakeAddrWithCacheRetBs cacheStatus cacheNew (Ledger.raNetwork rwdAcc) (Ledger.raCredential rwdAcc)
130+
queryRewardAccountWithCacheRetBs cacheStatus cacheUA rwdAcc =
131+
queryStakeAddrWithCacheRetBs cacheStatus cacheUA (Ledger.raNetwork rwdAcc) (Ledger.raCredential rwdAcc)
132132

133133
queryStakeAddrWithCache ::
134134
forall m.
135135
MonadIO m =>
136136
CacheStatus ->
137-
CacheNew ->
137+
CacheUpdateAction ->
138138
Network ->
139139
StakeCred ->
140140
ReaderT SqlBackend m (Either DB.LookupFail DB.StakeAddressId)
141-
queryStakeAddrWithCache cacheStatus cacheNew nw cred =
142-
mapLeft fst <$> queryStakeAddrWithCacheRetBs cacheStatus cacheNew nw cred
141+
queryStakeAddrWithCache cacheStatus cacheUA nw cred =
142+
mapLeft fst <$> queryStakeAddrWithCacheRetBs cacheStatus cacheUA nw cred
143143

144144
queryStakeAddrWithCacheRetBs ::
145145
forall m.
146146
MonadIO m =>
147147
CacheStatus ->
148-
CacheNew ->
148+
CacheUpdateAction ->
149149
Network ->
150150
StakeCred ->
151151
ReaderT SqlBackend m (Either (DB.LookupFail, ByteString) DB.StakeAddressId)
152-
queryStakeAddrWithCacheRetBs cacheStatus cacheNew nw cred = do
152+
queryStakeAddrWithCacheRetBs cacheStatus cacheUA nw cred = do
153153
case cacheStatus of
154154
NoCache -> do
155155
let !bs = Ledger.serialiseRewardAccount (Ledger.RewardAccount nw cred)
156156
mapLeft (,bs) <$> queryStakeAddress bs
157157
ActiveCache ci -> do
158158
mp <- liftIO $ readTVarIO (cStakeCreds ci)
159-
(mAddrId, mp') <- queryStakeAddrAux cacheNew mp (cStats ci) nw cred
159+
(mAddrId, mp') <- queryStakeAddrAux cacheUA mp (cStats ci) nw cred
160160
liftIO $ atomically $ writeTVar (cStakeCreds ci) mp'
161161
pure mAddrId
162162

163163
queryStakeAddrAux ::
164164
MonadIO m =>
165-
CacheNew ->
165+
CacheUpdateAction ->
166166
StakeAddrCache ->
167167
StrictTVar IO CacheStatistics ->
168168
Network ->
169169
StakeCred ->
170170
ReaderT SqlBackend m (Either (DB.LookupFail, ByteString) DB.StakeAddressId, StakeAddrCache)
171-
queryStakeAddrAux cacheNew mp sts nw cred =
171+
queryStakeAddrAux cacheUA mp sts nw cred =
172172
case Map.lookup cred mp of
173173
Just addrId -> do
174174
liftIO $ hitCreds sts
175-
case cacheNew of
176-
EvictAndReturn -> pure (Right addrId, Map.delete cred mp)
175+
case cacheUA of
176+
EvictAndUpdateCache -> pure (Right addrId, Map.delete cred mp)
177177
_ -> pure (Right addrId, mp)
178178
Nothing -> do
179179
liftIO $ missCreds sts
180180
let !bs = Ledger.serialiseRewardAccount (Ledger.RewardAccount nw cred)
181181
mAddrId <- mapLeft (,bs) <$> queryStakeAddress bs
182-
case (mAddrId, cacheNew) of
183-
(Right addrId, CacheNew) -> pure (Right addrId, Map.insert cred addrId mp)
182+
case (mAddrId, cacheUA) of
183+
(Right addrId, UpdateCache) -> pure (Right addrId, Map.insert cred addrId mp)
184184
(Right addrId, _) -> pure (Right addrId, mp)
185185
(err, _) -> pure (err, mp)
186186

187187
queryPoolKeyWithCache ::
188188
MonadIO m =>
189189
CacheStatus ->
190-
CacheNew ->
190+
CacheUpdateAction ->
191191
PoolKeyHash ->
192192
ReaderT SqlBackend m (Either DB.LookupFail DB.PoolHashId)
193-
queryPoolKeyWithCache cacheStatus cacheNew hsh =
193+
queryPoolKeyWithCache cacheStatus cacheUA hsh =
194194
case cacheStatus of
195195
NoCache -> do
196196
mPhId <- queryPoolHashId (Generic.unKeyHashRaw hsh)
@@ -203,7 +203,7 @@ queryPoolKeyWithCache cacheStatus cacheNew hsh =
203203
Just phId -> do
204204
liftIO $ hitPools (cStats ci)
205205
-- hit so we can't cache even with 'CacheNew'
206-
when (cacheNew == EvictAndReturn) $
206+
when (cacheUA == EvictAndUpdateCache) $
207207
liftIO $
208208
atomically $
209209
modifyTVar (cPools ci) $
@@ -216,7 +216,7 @@ queryPoolKeyWithCache cacheStatus cacheNew hsh =
216216
Nothing -> pure $ Left (DB.DbLookupMessage "PoolKeyHash")
217217
Just phId -> do
218218
-- missed so we can't evict even with 'EvictAndReturn'
219-
when (cacheNew == CacheNew) $
219+
when (cacheUA == UpdateCache) $
220220
liftIO $
221221
atomically $
222222
modifyTVar (cPools ci) $
@@ -226,10 +226,10 @@ queryPoolKeyWithCache cacheStatus cacheNew hsh =
226226
insertPoolKeyWithCache ::
227227
(MonadBaseControl IO m, MonadIO m) =>
228228
CacheStatus ->
229-
CacheNew ->
229+
CacheUpdateAction ->
230230
PoolKeyHash ->
231231
ReaderT SqlBackend m DB.PoolHashId
232-
insertPoolKeyWithCache cacheStatus cacheNew pHash =
232+
insertPoolKeyWithCache cacheStatus cacheUA pHash =
233233
case cacheStatus of
234234
NoCache ->
235235
DB.insertPoolHash $
@@ -242,7 +242,7 @@ insertPoolKeyWithCache cacheStatus cacheNew pHash =
242242
case Map.lookup pHash mp of
243243
Just phId -> do
244244
liftIO $ hitPools (cStats ci)
245-
when (cacheNew == EvictAndReturn) $
245+
when (cacheUA == EvictAndUpdateCache) $
246246
liftIO $
247247
atomically $
248248
modifyTVar (cPools ci) $
@@ -256,7 +256,7 @@ insertPoolKeyWithCache cacheStatus cacheNew pHash =
256256
{ DB.poolHashHashRaw = Generic.unKeyHashRaw pHash
257257
, DB.poolHashView = Generic.unKeyHashView pHash
258258
}
259-
when (cacheNew == CacheNew) $
259+
when (cacheUA == UpdateCache) $
260260
liftIO $
261261
atomically $
262262
modifyTVar (cPools ci) $
@@ -268,12 +268,12 @@ queryPoolKeyOrInsert ::
268268
Text ->
269269
Trace IO Text ->
270270
CacheStatus ->
271-
CacheNew ->
271+
CacheUpdateAction ->
272272
Bool ->
273273
PoolKeyHash ->
274274
ReaderT SqlBackend m DB.PoolHashId
275-
queryPoolKeyOrInsert txt trce cacheStatus cacheNew logsWarning hsh = do
276-
pk <- queryPoolKeyWithCache cacheStatus cacheNew hsh
275+
queryPoolKeyOrInsert txt trce cacheStatus cacheUA logsWarning hsh = do
276+
pk <- queryPoolKeyWithCache cacheStatus cacheUA hsh
277277
case pk of
278278
Right poolHashId -> pure poolHashId
279279
Left err -> do
@@ -289,7 +289,7 @@ queryPoolKeyOrInsert txt trce cacheStatus cacheNew logsWarning hsh = do
289289
, txt
290290
, ". We will assume that the pool exists and move on."
291291
]
292-
insertPoolKeyWithCache cacheStatus cacheNew hsh
292+
insertPoolKeyWithCache cacheStatus cacheUA hsh
293293

294294
queryMAWithCache ::
295295
MonadIO m =>

cardano-db-sync/src/Cardano/DbSync/Cache/Types.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
module Cardano.DbSync.Cache.Types (
99
CacheStatus (..),
10-
CacheNew (..),
10+
CacheUpdateAction (..),
1111
CacheEpoch (..),
1212
CacheInternal (..),
1313
EpochBlockDiff (..),
@@ -50,10 +50,10 @@ data CacheStatus
5050
= NoCache
5151
| ActiveCache !CacheInternal
5252

53-
data CacheNew
54-
= CacheNew
55-
| DontCacheNew
56-
| EvictAndReturn
53+
data CacheUpdateAction
54+
= UpdateCache
55+
| DoNotUpdateCache
56+
| EvictAndUpdateCache
5757
deriving (Eq)
5858

5959
data CacheInternal = CacheInternal

cardano-db-sync/src/Cardano/DbSync/Era/Universal/Adjust.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Cardano.DbSync.Cache (
1313
queryPoolKeyWithCache,
1414
queryStakeAddrWithCache,
1515
)
16-
import Cardano.DbSync.Cache.Types (CacheNew (..), CacheStatus)
16+
import Cardano.DbSync.Cache.Types (CacheStatus, CacheUpdateAction (..))
1717
import qualified Cardano.DbSync.Era.Shelley.Generic.Rewards as Generic
1818
import Cardano.DbSync.Types (StakeCred)
1919
import Cardano.Ledger.BaseTypes (Network)
@@ -67,7 +67,7 @@ adjustEpochRewards tracer nw cache epochNo rwds creds = do
6767
forM_ eraIgnored $ \(cred, rewards) ->
6868
forM_ (Set.toList rewards) $ \rwd ->
6969
deleteReward nw cache epochNo (cred, rwd)
70-
crds <- rights <$> forM (Set.toList creds) (queryStakeAddrWithCache cache DontCacheNew nw)
70+
crds <- rights <$> forM (Set.toList creds) (queryStakeAddrWithCache cache DoNotUpdateCache nw)
7171
deleteOrphanedRewards epochNo crds
7272

7373
deleteReward ::
@@ -78,8 +78,8 @@ deleteReward ::
7878
(StakeCred, Generic.Reward) ->
7979
ReaderT SqlBackend m ()
8080
deleteReward nw cache epochNo (cred, rwd) = do
81-
mAddrId <- queryStakeAddrWithCache cache DontCacheNew nw cred
82-
eiPoolId <- queryPoolKeyWithCache cache DontCacheNew (Generic.rewardPool rwd)
81+
mAddrId <- queryStakeAddrWithCache cache DoNotUpdateCache nw cred
82+
eiPoolId <- queryPoolKeyWithCache cache DoNotUpdateCache (Generic.rewardPool rwd)
8383
case (mAddrId, eiPoolId) of
8484
(Right addrId, Right poolId) -> do
8585
delete $ do

cardano-db-sync/src/Cardano/DbSync/Era/Universal/Block.hs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Cardano.DbSync.Cache (
2121
queryPrevBlockWithCache,
2222
)
2323
import Cardano.DbSync.Cache.Epoch (writeEpochBlockDiffToCache)
24-
import Cardano.DbSync.Cache.Types (CacheNew (..), CacheStatus (..), EpochBlockDiff (..))
24+
import Cardano.DbSync.Cache.Types (CacheStatus (..), CacheUpdateAction (..), EpochBlockDiff (..))
2525

2626
import qualified Cardano.DbSync.Era.Shelley.Generic as Generic
2727
import Cardano.DbSync.Era.Universal.Epoch
@@ -67,13 +67,13 @@ insertBlockUniversal syncEnv shouldLog withinTwoMins withinHalfHour blk details
6767
runExceptT $ do
6868
pbid <- case Generic.blkPreviousHash blk of
6969
Nothing -> liftLookupFail (renderErrorMessage (Generic.blkEra blk)) DB.queryGenesis -- this is for networks that fork from Byron on epoch 0.
70-
Just pHash -> queryPrevBlockWithCache (renderErrorMessage (Generic.blkEra blk)) cache pHash
71-
mPhid <- lift $ queryPoolKeyWithCache cache CacheNew $ coerceKeyRole $ Generic.blkSlotLeader blk
70+
Just pHash -> queryPrevBlockWithCache (renderErrorMessage (Generic.blkEra blk)) cacheStatus pHash
71+
mPhid <- lift $ queryPoolKeyWithCache cacheStatus UpdateCache $ coerceKeyRole $ Generic.blkSlotLeader blk
7272
let epochNo = sdEpochNo details
7373

7474
slid <- lift . DB.insertSlotLeader $ Generic.mkSlotLeader (ioShelley iopts) (Generic.unKeyHashRaw $ Generic.blkSlotLeader blk) (eitherToMaybe mPhid)
7575
blkId <-
76-
lift . insertBlockAndCache cache $
76+
lift . insertBlockAndCache cacheStatus $
7777
DB.Block
7878
{ DB.blockHash = Generic.blkHash blk
7979
, DB.blockEpochNo = Just $ unEpochNo epochNo
@@ -104,7 +104,7 @@ insertBlockUniversal syncEnv shouldLog withinTwoMins withinHalfHour blk details
104104
when (soptEpochAndCacheEnabled $ envOptions syncEnv)
105105
. newExceptT
106106
$ writeEpochBlockDiffToCache
107-
cache
107+
cacheStatus
108108
EpochBlockDiff
109109
{ ebdBlockId = blkId
110110
, ebdTime = sdSlotTime details
@@ -181,5 +181,5 @@ insertBlockUniversal syncEnv shouldLog withinTwoMins withinHalfHour blk details
181181
tracer :: Trace IO Text
182182
tracer = getTrace syncEnv
183183

184-
cache :: CacheStatus
185-
cache = envCache syncEnv
184+
cacheStatus :: CacheStatus
185+
cacheStatus = envCache syncEnv

cardano-db-sync/src/Cardano/DbSync/Era/Universal/Epoch.hs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import qualified Cardano.Db as DB
2626
import Cardano.DbSync.Api
2727
import Cardano.DbSync.Api.Types (InsertOptions (..), SyncEnv (..))
2828
import Cardano.DbSync.Cache (queryOrInsertStakeAddress, queryPoolKeyOrInsert)
29-
import Cardano.DbSync.Cache.Types (CacheNew (..), CacheStatus)
29+
import Cardano.DbSync.Cache.Types (CacheStatus, CacheUpdateAction (..))
3030
import qualified Cardano.DbSync.Era.Shelley.Generic as Generic
3131
import Cardano.DbSync.Era.Universal.Insert.Certificate (insertPots)
3232
import Cardano.DbSync.Era.Universal.Insert.GovAction (insertCostModel, insertDrepDistr, insertUpdateEnacted, updateExpired, updateRatified)
@@ -201,9 +201,9 @@ insertEpochStake ::
201201
[(StakeCred, (Shelley.Coin, PoolKeyHash))] ->
202202
ExceptT SyncNodeError (ReaderT SqlBackend m) ()
203203
insertEpochStake syncEnv nw epochNo stakeChunk = do
204-
let cache = envCache syncEnv
204+
let cacheStatus = envCache syncEnv
205205
DB.ManualDbConstraints {..} <- liftIO $ readTVarIO $ envDbConstraints syncEnv
206-
dbStakes <- mapM (mkStake cache) stakeChunk
206+
dbStakes <- mapM (mkStake cacheStatus) stakeChunk
207207
let chunckDbStakes = splittRecordsEvery 100000 dbStakes
208208
-- minimising the bulk inserts into hundred thousand chunks to improve performance
209209
forM_ chunckDbStakes $ \dbs -> lift $ DB.insertManyEpochStakes dbConstraintEpochStake constraintNameEpochStake dbs
@@ -213,9 +213,9 @@ insertEpochStake syncEnv nw epochNo stakeChunk = do
213213
CacheStatus ->
214214
(StakeCred, (Shelley.Coin, PoolKeyHash)) ->
215215
ExceptT SyncNodeError (ReaderT SqlBackend m) DB.EpochStake
216-
mkStake cache (saddr, (coin, pool)) = do
217-
saId <- lift $ queryOrInsertStakeAddress cache CacheNew nw saddr
218-
poolId <- lift $ queryPoolKeyOrInsert "insertEpochStake" trce cache CacheNew (ioShelley iopts) pool
216+
mkStake cacheStatus (saddr, (coin, pool)) = do
217+
saId <- lift $ queryOrInsertStakeAddress cacheStatus UpdateCache nw saddr
218+
poolId <- lift $ queryPoolKeyOrInsert "insertEpochStake" trce cacheStatus UpdateCache (ioShelley iopts) pool
219219
pure $
220220
DB.EpochStake
221221
{ DB.epochStakeAddrId = saId
@@ -236,7 +236,7 @@ insertRewards ::
236236
CacheStatus ->
237237
[(StakeCred, Set Generic.Reward)] ->
238238
ExceptT SyncNodeError (ReaderT SqlBackend m) ()
239-
insertRewards syncEnv nw earnedEpoch spendableEpoch cache rewardsChunk = do
239+
insertRewards syncEnv nw earnedEpoch spendableEpoch cacheStatus rewardsChunk = do
240240
DB.ManualDbConstraints {..} <- liftIO $ readTVarIO $ envDbConstraints syncEnv
241241
dbRewards <- concatMapM mkRewards rewardsChunk
242242
let chunckDbRewards = splittRecordsEvery 100000 dbRewards
@@ -248,7 +248,7 @@ insertRewards syncEnv nw earnedEpoch spendableEpoch cache rewardsChunk = do
248248
(StakeCred, Set Generic.Reward) ->
249249
ExceptT SyncNodeError (ReaderT SqlBackend m) [DB.Reward]
250250
mkRewards (saddr, rset) = do
251-
saId <- lift $ queryOrInsertStakeAddress cache CacheNew nw saddr
251+
saId <- lift $ queryOrInsertStakeAddress cacheStatus UpdateCache nw saddr
252252
mapM (prepareReward saId) (Set.toList rset)
253253

254254
prepareReward ::
@@ -273,7 +273,7 @@ insertRewards syncEnv nw earnedEpoch spendableEpoch cache rewardsChunk = do
273273
PoolKeyHash ->
274274
ExceptT SyncNodeError (ReaderT SqlBackend m) DB.PoolHashId
275275
queryPool poolHash =
276-
lift (queryPoolKeyOrInsert "insertRewards" trce cache CacheNew (ioShelley iopts) poolHash)
276+
lift (queryPoolKeyOrInsert "insertRewards" trce cacheStatus UpdateCache (ioShelley iopts) poolHash)
277277

278278
trce = getTrace syncEnv
279279
iopts = getInsertOptions syncEnv
@@ -286,7 +286,7 @@ insertRewardRests ::
286286
CacheStatus ->
287287
[(StakeCred, Set Generic.RewardRest)] ->
288288
ExceptT SyncNodeError (ReaderT SqlBackend m) ()
289-
insertRewardRests nw earnedEpoch spendableEpoch cache rewardsChunk = do
289+
insertRewardRests nw earnedEpoch spendableEpoch cacheStatus rewardsChunk = do
290290
dbRewards <- concatMapM mkRewards rewardsChunk
291291
let chunckDbRewards = splittRecordsEvery 100000 dbRewards
292292
-- minimising the bulk inserts into hundred thousand chunks to improve performance
@@ -297,7 +297,7 @@ insertRewardRests nw earnedEpoch spendableEpoch cache rewardsChunk = do
297297
(StakeCred, Set Generic.RewardRest) ->
298298
ExceptT SyncNodeError (ReaderT SqlBackend m) [DB.RewardRest]
299299
mkRewards (saddr, rset) = do
300-
saId <- lift $ queryOrInsertStakeAddress cache CacheNew nw saddr
300+
saId <- lift $ queryOrInsertStakeAddress cacheStatus UpdateCache nw saddr
301301
pure $ map (prepareReward saId) (Set.toList rset)
302302

303303
prepareReward ::
@@ -321,7 +321,7 @@ insertProposalRefunds ::
321321
CacheStatus ->
322322
[GovActionRefunded] ->
323323
ExceptT SyncNodeError (ReaderT SqlBackend m) ()
324-
insertProposalRefunds nw earnedEpoch spendableEpoch cache refunds = do
324+
insertProposalRefunds nw earnedEpoch spendableEpoch cacheStatus refunds = do
325325
dbRewards <- mapM mkReward refunds
326326
lift $ DB.insertManyRewardRests dbRewards
327327
where
@@ -330,7 +330,7 @@ insertProposalRefunds nw earnedEpoch spendableEpoch cache refunds = do
330330
GovActionRefunded ->
331331
ExceptT SyncNodeError (ReaderT SqlBackend m) DB.RewardRest
332332
mkReward refund = do
333-
saId <- lift $ queryOrInsertStakeAddress cache CacheNew nw (raCredential $ garReturnAddr refund)
333+
saId <- lift $ queryOrInsertStakeAddress cacheStatus UpdateCache nw (raCredential $ garReturnAddr refund)
334334
pure $
335335
DB.RewardRest
336336
{ DB.rewardRestAddrId = saId

0 commit comments

Comments
 (0)