Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
[CDEC-451] Update comments / address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hueschen committed Jul 23, 2018
1 parent 1f2c8a9 commit 58d7d91
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
5 changes: 2 additions & 3 deletions core/src/Pos/Core/Conc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ delay :: (TimeUnit t, MonadIO m)
-> m ()
delay time = liftIO (Conc.threadDelay (fromIntegral (toMicroseconds time)))

-- | This function is analogous to `System.Timeout.timeout`, it's
-- based on `Race` and `Delay`.
-- TODO mhueschen - make sure this is equivalent to the old method
-- | This function is analogous to `System.Timeout.timeout`. It's
-- based on `race` and `delay`.
timeout :: (TimeUnit t, MonadUnliftIO m) => t -> m a -> m (Maybe a)
timeout t ma = rightToMaybe <$> race (delay t) ma

Expand Down
5 changes: 1 addition & 4 deletions infra/src/Pos/Infra/Slotting/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ type MonadOnNewSlot ctx m =
)

-- | Run given action as soon as new slot starts, passing SlotId to
-- it. This function uses Mockable and assumes consistency between
-- MonadSlots and Mockable implementations.
-- TODO mhueschen ^ get feedback on what this comment means and what
-- we should do about it.
-- it.
onNewSlot
:: (MonadOnNewSlot ctx m, HasProtocolConstants)
=> OnNewSlotParams -> (SlotId -> m ()) -> m ()
Expand Down
6 changes: 0 additions & 6 deletions tools/src/dbgen/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,6 @@ newWalletState recreate walletPath =
-- to rebuild the DB, but rather append stuff into it.
liftIO $ openState (not recreate) walletPath

-- TODO mhueschen get feedback about usage of this module and whether
-- the instance from `Pos.Core.Conc` can eclipse this.
-- instance HasLoggerName IO where
-- askLoggerName = pure $ LoggerName "dbgen"
-- modifyLoggerName _ x = x

-- TODO(ks): Fix according to Pos.Client.CLI.Options
newConfig :: CLI -> ConfigurationOptions
newConfig CLI{..} = defaultConfigurationOptions {
Expand Down

0 comments on commit 58d7d91

Please sign in to comment.