Skip to content
Permalink
Browse files

add more debug in `initPassiveWallet`

  • Loading branch information...
cleverca22 committed Mar 15, 2019
1 parent d2d959c commit f165b48dbeb174e4ed0910193f61ee685307c4d0
Showing with 8 additions and 0 deletions.
  1. +8 −0 wallet-new/src/Cardano/Wallet/Kernel.hs
@@ -160,17 +160,23 @@ initPassiveWallet :: ProtocolMagic
-> FInjects IO
-> IO PassiveWallet
initPassiveWallet pm logMessage keystore handles node fInjects = do
logInfo "point 5.1"
pw <- preparePassiveWallet
logInfo "point 5.5"
initSubmission pw
logInfo "point 5.7"
return pw
where
-- | Prepare Passive Wallet for initialisation.
-- NOTE: the Submission Layer is not initialised yet since that would require
-- access to the PassiveWallet state
preparePassiveWallet :: IO PassiveWallet
preparePassiveWallet = do
logInfo "point 5.2"
submission <- newMVar emptyWalletSubmission
logInfo "point 5.3"
restore <- newRestorationTasks
logInfo "point 5.4"
return PassiveWallet {
_walletLogMessage = logMessage
, _walletKeystore = keystore
@@ -187,7 +193,9 @@ initPassiveWallet pm logMessage keystore handles node fInjects = do
-- the submission layer with all pending transactions present in the wallet state.
initSubmission :: PassiveWallet -> IO ()
initSubmission pw_ = do
logInfo "point 5.5"
pendings <- pendingByAccount <$> getWalletSnapshot pw_
logInfo "point 5.6"
Strict.modifyMVar_ (_walletSubmission pw_) $
return . addPendings pendings

0 comments on commit f165b48

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.