diff --git a/lib/shelley/exe/local-cluster.hs b/lib/shelley/exe/local-cluster.hs index 877fc04d8df..0cfb3faf9ad 100644 --- a/lib/shelley/exe/local-cluster.hs +++ b/lib/shelley/exe/local-cluster.hs @@ -221,13 +221,14 @@ main = withLocalClusterSetup $ \dir clusterLogs walletLogs -> setupFaucet dir trCluster socketPath = do traceWith trCluster MsgSettingUpFaucet let trCluster' = contramap MsgCluster trCluster - let encodeAddr = T.unpack . encodeAddress @'Mainnet - let addresses = map (first encodeAddr) shelleyIntegrationTestFunds - let assetAddresses = map (first encodeAddr) maryIntegrationTestAssets + let encodeAddresses = map (first (T.unpack . encodeAddress @'Mainnet)) let accts = concatMap genRewardAccounts mirMnemonics - let rewards = (,Coin $ fromIntegral oneMillionAda) <$> accts - sendFaucetFundsTo trCluster' socketPath dir addresses - sendFaucetAssetsTo trCluster' socketPath dir assetAddresses + let rewards = (, Coin $ fromIntegral oneMillionAda) <$> accts + + sendFaucetFundsTo trCluster' socketPath dir $ + encodeAddresses shelleyIntegrationTestFunds + sendFaucetAssetsTo trCluster' socketPath dir $ + encodeAddresses maryIntegrationTestAssets moveInstantaneousRewardsTo trCluster' socketPath dir rewards whenReady dir trCluster logs (RunningNode socketPath block0 (gp, vData)) = diff --git a/lib/shelley/src/Cardano/Wallet/Shelley/Launch/Cluster.hs b/lib/shelley/src/Cardano/Wallet/Shelley/Launch/Cluster.hs index ac215a46db0..1308a50e861 100644 --- a/lib/shelley/src/Cardano/Wallet/Shelley/Launch/Cluster.hs +++ b/lib/shelley/src/Cardano/Wallet/Shelley/Launch/Cluster.hs @@ -1239,8 +1239,10 @@ sendFaucetAssetsTo -> FilePath -> [(String, (TokenBundle, [(String, String)]))] -- ^ (address, assets) -> IO () -sendFaucetAssetsTo tr conn dir targets = batch 20 targets $ - sendFaucet tr conn dir "assets" +sendFaucetAssetsTo tr conn dir targets = do + era <- getClusterEra dir + when (era >= MaryHardFork) $ + batch 20 targets $ sendFaucet tr conn dir "assets" -- | Build, sign, and send a batch of faucet funding transactions using -- @cardano-cli@. This function is used by 'sendFaucetFundsTo' and diff --git a/lib/shelley/test/integration/Main.hs b/lib/shelley/test/integration/Main.hs index dddce6ead46..e37ccded255 100644 --- a/lib/shelley/test/integration/Main.hs +++ b/lib/shelley/test/integration/Main.hs @@ -299,11 +299,11 @@ specWithServer testDir (tr, tracers) = aroundAll withContext let rewards = (,Coin $ fromIntegral oneMillionAda) <$> concatMap genRewardAccounts mirMnemonics moveInstantaneousRewardsTo tr' conn testDir rewards - let encodeAddr = T.unpack . encodeAddress @'Mainnet - let addresses = map (first encodeAddr) shelleyIntegrationTestFunds - let assetAddresses = map (first encodeAddr) maryIntegrationTestAssets - sendFaucetFundsTo tr' conn testDir addresses - sendFaucetAssetsTo tr' conn testDir assetAddresses + let encodeAddresses = map (first (T.unpack . encodeAddress @'Mainnet)) + sendFaucetFundsTo tr' conn testDir $ + encodeAddresses shelleyIntegrationTestFunds + sendFaucetAssetsTo tr' conn testDir $ + encodeAddresses maryIntegrationTestAssets onClusterStart action dbDecorator (RunningNode conn block0 (gp, vData)) = do setupFaucet conn