From d334da302cde5f01e1ddce436d0b4294c04689f7 Mon Sep 17 00:00:00 2001 From: Dzmitry Shuysky Date: Tue, 20 Aug 2024 15:31:55 +0200 Subject: [PATCH] cardano-testnet: Set lovelace supply to uint64 max value --- src/Internal/Testnet/Server.purs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Internal/Testnet/Server.purs b/src/Internal/Testnet/Server.purs index 63e09f5b4a..2e779b31ec 100644 --- a/src/Internal/Testnet/Server.purs +++ b/src/Internal/Testnet/Server.purs @@ -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 ((<|>)) @@ -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