Skip to content

Commit

Permalink
do notation style
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Jul 12, 2019
1 parent a8f8849 commit 29b867b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/core/src/Cardano/Wallet.hs
Expand Up @@ -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.
Expand Down

0 comments on commit 29b867b

Please sign in to comment.