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

Commit 58d7d91

Browse files
author
Michael Hueschen
committed
[CDEC-451] Update comments / address feedback
1 parent 1f2c8a9 commit 58d7d91

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

core/src/Pos/Core/Conc.hs

+2-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ delay :: (TimeUnit t, MonadIO m)
4949
-> m ()
5050
delay time = liftIO (Conc.threadDelay (fromIntegral (toMicroseconds time)))
5151

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

infra/src/Pos/Infra/Slotting/Util.hs

+1-4
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,7 @@ type MonadOnNewSlot ctx m =
111111
)
112112

113113
-- | Run given action as soon as new slot starts, passing SlotId to
114-
-- it. This function uses Mockable and assumes consistency between
115-
-- MonadSlots and Mockable implementations.
116-
-- TODO mhueschen ^ get feedback on what this comment means and what
117-
-- we should do about it.
114+
-- it.
118115
onNewSlot
119116
:: (MonadOnNewSlot ctx m, HasProtocolConstants)
120117
=> OnNewSlotParams -> (SlotId -> m ()) -> m ()

tools/src/dbgen/Main.hs

-6
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,6 @@ newWalletState recreate walletPath =
141141
-- to rebuild the DB, but rather append stuff into it.
142142
liftIO $ openState (not recreate) walletPath
143143

144-
-- TODO mhueschen get feedback about usage of this module and whether
145-
-- the instance from `Pos.Core.Conc` can eclipse this.
146-
-- instance HasLoggerName IO where
147-
-- askLoggerName = pure $ LoggerName "dbgen"
148-
-- modifyLoggerName _ x = x
149-
150144
-- TODO(ks): Fix according to Pos.Client.CLI.Options
151145
newConfig :: CLI -> ConfigurationOptions
152146
newConfig CLI{..} = defaultConfigurationOptions {

0 commit comments

Comments
 (0)