Skip to content

Commit

Permalink
Rename smart constructor to initialDistribution
Browse files Browse the repository at this point in the history
  • Loading branch information
florentc committed Feb 6, 2023
1 parent 317b006 commit 492ab94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cooked-validators/src/Cooked/Wallet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ distributionFromList = InitialDistribution . Map.fromList

-- | Extension of the default initial distribution with additional value in
-- some wallets.
initialDistribution' :: [(Wallet, [Pl.Value])] -> InitialDistribution
initialDistribution' = (def <>) . distributionFromList
initialDistribution :: [(Wallet, [Pl.Value])] -> InitialDistribution
initialDistribution = (def <>) . distributionFromList

-- | Bootstraps an initial transaction resulting in a state where wallets
-- posess UTxOs fitting a given 'InitialDistribution'
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/AuctionSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bananasIn v = Value.assetClassValueOf v bananaAssetClass

-- | initial distribution s.t. everyone owns five bananas
testInit :: InitialDistribution
testInit = initialDistribution' [(i, [Ada.lovelaceValueOf 2_000_000 <> banana 5]) | i <- knownWallets]
testInit = initialDistribution [(i, [Ada.lovelaceValueOf 2_000_000 <> banana 5]) | i <- knownWallets]

-- * Successful single-trace runs

Expand Down

0 comments on commit 492ab94

Please sign in to comment.