diff --git a/cardano-cli/src/Cardano/CLI/Types/Common.hs b/cardano-cli/src/Cardano/CLI/Types/Common.hs index d78967fb9e..fa027864d8 100644 --- a/cardano-cli/src/Cardano/CLI/Types/Common.hs +++ b/cardano-cli/src/Cardano/CLI/Types/Common.hs @@ -42,9 +42,9 @@ module Cardano.CLI.Types.Common , ParserFileDirection (..) , IdOutputFormat (..) , PrivKeyFile(..) - , ProposalBinary(..) + , ProposalBinary , ProposalFile - , ProposalText(..) + , ProposalText , ProposalUrl(..) , ProtocolParamsFile(..) , QueryOutputFormat(..) @@ -92,7 +92,6 @@ import qualified Cardano.Chain.Slotting as Byron import Data.Aeson (FromJSON (..), ToJSON (..), object, pairs, (.=)) import qualified Data.Aeson as Aeson -import qualified Data.ByteString as BS import Data.String (IsString) import Data.Text (Text) import qualified Data.Text as Text @@ -124,13 +123,11 @@ newtype ProposalUrl = ProposalUrl { unProposalUrl :: L.Url } deriving (Eq, Show) -newtype ProposalBinary = ProposalBinary - { unProposalBinary :: BS.ByteString - } deriving (Eq, Show) +-- | Tag for tracking proposals submitted as 'Bytestring' +data ProposalBinary -newtype ProposalText = ProposalText - { unProposalText :: Text - } deriving (Eq, Show) +-- | Tag for tracking proposals submitted as 'Text.Text' +data ProposalText newtype VoteUrl = VoteUrl { unVoteUrl :: L.Url diff --git a/cardano-cli/test/cardano-cli-golden/Test/Golden/CreateTestnetData.hs b/cardano-cli/test/cardano-cli-golden/Test/Golden/CreateTestnetData.hs index ea417b3001..d433c96a3b 100644 --- a/cardano-cli/test/cardano-cli-golden/Test/Golden/CreateTestnetData.hs +++ b/cardano-cli/test/cardano-cli-golden/Test/Golden/CreateTestnetData.hs @@ -157,15 +157,16 @@ hprop_golden_create_testnet_data_deleg_non_deleg = (L.sgMaxLovelaceSupply genesis) H.=== (fromIntegral totalSupply) let initialFunds = ListMap.toList $ L.sgInitialFunds genesis - + -- This checks that there is actually only one funded address (length initialFunds) H.=== 1 + let L.Coin onlyHolderCoin = snd $ initialFunds !! 0 -- The check below may seem weird, but we cannot do a very precise check -- on balances, because of the treasury "stealing" some of the money. -- Nevertheless, this check catches a confusion between delegated and -- non-delegated coins, by virtue of --delegated-supply being a fourth - -- of --total-supply above. - -- https://github.com/IntersectMBO/cardano-cli/issues/631 + -- of --total-supply above. This confusion actually happened in the past, as + -- https://github.com/IntersectMBO/cardano-cli/issues/631 witnesses. H.assertWith (fromIntegral onlyHolderCoin) (\ohc -> ohc > totalSupply `div` 2)