Skip to content
Permalink
Browse files

add more debug to the `handlesOpen` area

  • Loading branch information...
cleverca22 committed Mar 15, 2019
1 parent 600f557 commit a74e1baf16c7b324fe885a09e1505034ba8b9bf1
Showing with 8 additions and 0 deletions.
  1. +8 −0 wallet-new/src/Cardano/Wallet/Kernel.hs
@@ -119,22 +119,30 @@ data WalletHandles = Handles {
-- and we should rethink if migrateMetaDB should happen here.
handlesOpen :: DatabaseMode -> IO WalletHandles
handlesOpen mode =
logInfo "point 5.8"
case mode of
UseInMemory -> do
db <- openMemoryState defDB
metadb <- openMetaDB ":memory:"
migrateMetaDB metadb
return $ Handles db metadb
UseFilePath (DatabaseOptions acidDb sqliteDb rebuildDB) -> do
logInfo "point 5.9"
let deleteMaybe fp = do
when rebuildDB $ do
itsHere <- doesPathExist fp
when itsHere $ removePathForcibly fp
logInfo "point 5.10"
deleteMaybe acidDb
logInfo "point 5.11"
db <- openLocalStateFrom acidDb defDB
logInfo "point 5.12"
deleteMaybe sqliteDb
logInfo "point 5.13"
metadb <- openMetaDB sqliteDb
logInfo "point 5.14"
migrateMetaDB metadb
logInfo "point 5.15"
return $ Handles db metadb

handlesClose :: DatabaseMode -> WalletHandles -> IO ()

0 comments on commit a74e1ba

Please sign in to comment.
You can’t perform that action at this time.