Skip to content

Commit

Permalink
create-testnet-data: take default value of --total-supply from shelle…
Browse files Browse the repository at this point in the history
…y genesis + default delegated supply to half the total supply (no default anymore)
  • Loading branch information
smelc committed Aug 23, 2024
1 parent 9f2ec91 commit 9db2c14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,9 @@ pGenesisCreateTestNetData sbe envCli =
, Opt.metavar "LOVELACE"
, Opt.help $
mconcat
[ "The maximum possible amount of Lovelace, which is evenly distributed across stake holders. Defaults to 1 million Ada (i.e. 10^12 Lovelace)."
[ "The maximum possible amount of Lovelace, which is evenly distributed across stake holders. Overrides the value from the shelley genesis."
, " If --delegated-supply is specified, a part of this amount will be delegated."
]
, Opt.value 1_000_000_000_000
]
pSupplyDelegated :: Parser (Maybe Coin)
pSupplyDelegated =
Expand All @@ -343,10 +342,9 @@ pGenesisCreateTestNetData sbe envCli =
, Opt.metavar "LOVELACE"
, Opt.help $
mconcat
[ "The amount of the total supply which is evenly delegated. Defaults to 500 000 Ada (i.e. (10^12) / 2 Lovelace)."
[ "The amount of the total supply which is evenly delegated. Defaulted to half of the total supply."
, " Cannot be more than the amount specified with --total-supply."
]
, Opt.value 500_000_000_000
]
pRelays :: Parser FilePath
pRelays =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ updateOutputTemplate
totalSupply = fromIntegral $ maybe maximumLovelaceSupply unLovelace mTotalSupply

delegCoinRaw, nonDelegCoinRaw :: Integer
delegCoinRaw = maybe 0 unLovelace mDelegatedSupply
delegCoinRaw = maybe (totalSupply `div` 2) unLovelace mDelegatedSupply
-- Since the user can specify total supply and delegated amount, the non-delegated amount is:
nonDelegCoinRaw = totalSupply - delegCoinRaw

Expand Down

0 comments on commit 9db2c14

Please sign in to comment.