Skip to content

Commit

Permalink
CAD-1968 generator: cooldown between genesis and split phases
Browse files Browse the repository at this point in the history
  • Loading branch information
deepfire committed Oct 19, 2020
1 parent e20f51f commit 0a2bfc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cardano-tx-generator/src/Cardano/Benchmarking/GeneratorTx.hs
Expand Up @@ -89,7 +89,8 @@ secureFunds :: ConfigSupportsTxGen mode era
-> GeneratorFunds
-> ExceptT TxGenError IO (SigningKeyOf era, Set (TxIn, TxOut era))

secureFunds b@Benchmark{bTxFee, bInitialTTL} m (FundsGenesis keyF) = do
secureFunds b@Benchmark{bTxFee, bInitialTTL, bInitCooldown=InitCooldown cooldown} m
(FundsGenesis keyF) = do
key <- readSigningKey (modeEra m) keyF
let (_, TxOut _ genesisCoin) = extractGenesisFunds m key
toAddr = keyAddress m modeNetworkId key
Expand All @@ -104,6 +105,7 @@ secureFunds b@Benchmark{bTxFee, bInitialTTL} m (FundsGenesis keyF) = do
[ "******* Funding secured (", show txin, " -> ", show txout
, "), submission result: " , show r ]
e -> fail $ show e
liftIO $ threadDelay (cooldown*1000*1000)
(key, ) <$> splitFunds b m key (txin, txout)

secureFunds b m@ModeShelley{} (FundsUtxo keyF txin txout) = do
Expand Down

0 comments on commit 0a2bfc2

Please sign in to comment.