Skip to content

Commit

Permalink
Rename mCleanPoolProduction to mCleanPoolDatabase.
Browse files Browse the repository at this point in the history
This function actually does clean the whole database, so the previous
name was a bit misleading.
  • Loading branch information
jonathanknowles committed Sep 14, 2020
1 parent 751be20 commit e7a89e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/core/src/Cardano/Pool/DB/MVar.hs
Expand Up @@ -25,7 +25,7 @@ import Cardano.Pool.DB.Model
, PoolDatabase
, PoolErr (..)
, emptyPoolDatabase
, mCleanPoolProduction
, mCleanDatabase
, mListRegisteredPools
, mListRetiredPools
, mPutFetchAttempt
Expand Down Expand Up @@ -152,7 +152,7 @@ newDBLayer timeInterpreter = do
pure retirementCerts

cleanDB =
void $ alterPoolDB (const Nothing) db mCleanPoolProduction
void $ alterPoolDB (const Nothing) db mCleanDatabase

readPoolMetadata = readPoolDB db mReadPoolMetadata

Expand Down
6 changes: 3 additions & 3 deletions lib/core/src/Cardano/Pool/DB/Model.hs
Expand Up @@ -32,7 +32,7 @@ module Cardano.Pool.DB.Model
, ModelPoolOp
, PoolErr (..)
-- * Model pool database functions
, mCleanPoolProduction
, mCleanDatabase
, mPutPoolProduction
, mReadPoolProduction
, mReadTotalProduction
Expand Down Expand Up @@ -165,8 +165,8 @@ newtype PoolErr = PointAlreadyExists BlockHeader
Model Pool Database Functions
-------------------------------------------------------------------------------}

mCleanPoolProduction :: ModelPoolOp ()
mCleanPoolProduction _ = (Right (), emptyPoolDatabase)
mCleanDatabase :: ModelPoolOp ()
mCleanDatabase _ = (Right (), emptyPoolDatabase)

mPutPoolProduction :: BlockHeader -> PoolId -> ModelPoolOp ()
mPutPoolProduction point poolId db@PoolDatabase{pools} =
Expand Down

0 comments on commit e7a89e9

Please sign in to comment.