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

Commit f833c23

Browse files
committed
[CDEC-285] Remove field accessors for FakeTxsHistory data type
1 parent b36024b commit f833c23

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tools/src/dbgen/Lib.hs

+5-6
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ _exampleSpec = GenSpec
6666
{ accounts = 1
6767
, accountSpec = AccountSpec { addresses = 100 }
6868
, fakeUtxoCoinDistr = RangeDistribution { amount = 1000, range = 100 }
69-
, fakeTxsHistory = SimpleTxsHistory { txsCount = 100, numOutgoingAddress = 3 }
69+
, fakeTxsHistory = SimpleTxsHistory 100 3
7070
}
7171
, wallets = 1
7272
}
@@ -146,11 +146,10 @@ data FakeTxsHistory
146146
= NoHistory
147147
-- ^ Do not generate fake history.
148148
| SimpleTxsHistory
149-
{ txsCount :: !Integer
149+
!Integer
150150
-- ^ Number of txs we want to generate.
151-
, numOutgoingAddress :: !NumOfOutgoingAddresses
151+
!NumOfOutgoingAddresses
152152
-- ^ Number of outgoing addreses of a single @Tx@.
153-
}
154153
-- ^ Simple tx history generation.
155154
-- TODO(ks): For now KISS, we can add more generation strategies.
156155
deriving (Show, Eq, Generic)
@@ -237,8 +236,8 @@ generateWalletDB CLI{..} spec@GenSpec{..} = do
237236

238237
-- | Here we generate fake txs. For now it's a simple arbitrary generation.
239238
generateFakeTxs :: FakeTxsHistory -> AccountId -> UberMonad ()
240-
generateFakeTxs NoHistory _ = pure ()
241-
generateFakeTxs SimpleTxsHistory{..} aId = do
239+
generateFakeTxs NoHistory _ = pure ()
240+
generateFakeTxs (SimpleTxsHistory txsCount numOutgoingAddress) aId = do
242241
-- Get the number of txs we need to generate.
243242
let txsNumber = fromIntegral txsCount
244243

0 commit comments

Comments
 (0)