Skip to content

Commit

Permalink
cardano-testnet: Set lovelace supply to uint64 max value
Browse files Browse the repository at this point in the history
  • Loading branch information
errfrom committed Aug 20, 2024
1 parent fe3be88 commit d334da3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Internal/Testnet/Server.purs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module Ctl.Internal.Testnet.Server
import Contract.Prelude hiding (log)

import Cardano.Types (NetworkId(MainnetId))
import Cardano.Types.BigNum (maxValue, toString) as BigNum
import Contract.Config (Hooks, defaultSynchronizationParams, defaultTimeParams)
import Contract.Monad (ContractEnv)
import Control.Alt ((<|>))
Expand Down Expand Up @@ -318,18 +319,18 @@ spawnCardanoTestnet { cwd } params = do
flag :: String -> String
flag name = "--" <> name

option :: forall a. Show a => String -> a -> Array String
option name value = [ flag name, show value ]

options :: Array String
options = join
[ [ "cardano" ]
, option "testnet-magic" params.testnetMagic
, [ flag $ show params.era ]
, option "slot-length" $ unwrap params.slotLength
, maybe mempty
(\epochSize -> [ flag "epoch-length", UInt.toString epochSize ])
params.epochSize
, [ flag "slot-length", show (unwrap params.slotLength) ]
, [ flag "testnet-magic", show params.testnetMagic ]
-- FIXME: max-lovelace-supply option has no effect, should be fixed upstream
-- https://github.com/IntersectMBO/cardano-node/issues/5953
, [ flag "max-lovelace-supply", BigNum.toString BigNum.maxValue ]
]

startCardanoTestnet
Expand Down

0 comments on commit d334da3

Please sign in to comment.