Skip to content
Permalink
Browse files

do notation style

  • Loading branch information...
paweljakubas committed Jul 12, 2019
1 parent a8f8849 commit 29b867b07c40f387cbc4083ff4c042663c94f04e
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/core/src/Cardano/Wallet.hs
@@ -545,15 +545,15 @@ newWalletLayer
-> WalletId
-> BlockHeader
-> IO ()
restoreSleep t wid slot =
let halfSlotLengthDelay = fromIntegral (diffTimeToPicoseconds slotLength `div` 2000000) in do
threadDelay halfSlotLengthDelay
runExceptT (networkTip nw) >>= \case
Left e -> do
logError t $ "Failed to get network tip: " +|| e ||+ ""
restoreSleep t wid slot
Right tip ->
restoreStep t wid (slot, tip)
restoreSleep t wid slot = do
let halfSlotLengthDelay = fromIntegral (diffTimeToPicoseconds slotLength `div` 2000000)
threadDelay halfSlotLengthDelay
runExceptT (networkTip nw) >>= \case
Left e -> do
logError t $ "Failed to get network tip: " +|| e ||+ ""
restoreSleep t wid slot
Right tip ->
restoreStep t wid (slot, tip)

-- | Apply the given blocks to the wallet and update the wallet state,
-- transaction history and corresponding metadata.

0 comments on commit 29b867b

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