@@ -31,9 +31,6 @@ module PraosProtocol.Common.ConcreteBlock (
31
31
hashBody ,
32
32
IsBody ,
33
33
34
- -- * Converting slots to times
35
- convertSlotToTimeForTestsAssumingNoHardFork ,
36
-
37
34
-- * Creating sample chains
38
35
mkChain ,
39
36
mkChainSimple ,
@@ -62,8 +59,6 @@ import Data.ByteString (ByteString)
62
59
import Data.Function (fix )
63
60
import Data.Hashable (Hashable (hash ))
64
61
import Data.String (IsString )
65
- import Data.Time.Calendar (fromGregorian )
66
- import Data.Time.Clock (UTCTime (.. ), addUTCTime , secondsToNominalDiffTime )
67
62
import Data.Typeable (Typeable )
68
63
import GHC.Generics (Generic )
69
64
import NoThunks.Class (NoThunks )
@@ -373,28 +368,3 @@ instance Serialise BlockBody where
373
368
encode (BlockBody b) = encodeBytes b
374
369
375
370
decode = BlockBody <$> decodeBytes
376
-
377
- {- ------------------------------------------------------------------------------
378
- Simple static time conversions, since no HardFork
379
- -------------------------------------------------------------------------------}
380
-
381
- -- | Arbitrarily but consistently converts slots UTCTimes.
382
- --
383
- -- It is only intended for use in tests. Notably it assumes a fixed system
384
- -- start time, slot length, and the absence of a hard fork (ie no
385
- -- HardForkCombinator). This is how it's available as a pure function.
386
- convertSlotToTimeForTestsAssumingNoHardFork :: SlotNo -> UTCTime
387
- convertSlotToTimeForTestsAssumingNoHardFork sl =
388
- flip addUTCTime startTime $
389
- -- ^ ^^ arbitrary start time for testing
390
- secondsToNominalDiffTime $
391
- fromIntegral $
392
- unSlotNo sl * 10
393
- where
394
- -- ^ ^^ arbitrary slot length for testing
395
-
396
- startTime =
397
- UTCTime
398
- { utctDay = fromGregorian 2000 1 1
399
- , utctDayTime = 0
400
- }
0 commit comments