Skip to content
Permalink
Browse files

Use correct TxFeePolicy

  • Loading branch information...
ruhatch committed Mar 15, 2019
1 parent 338dc93 commit a354ba6fbc803bcd7d3a2c006f75ad986a8c1dfc
@@ -1,7 +1,8 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE TypeApplications #-}

-- | This module provides functionality for translating abstract blocks into
-- concrete blocks. The abstract blocks are generated according the small-step
@@ -43,7 +44,9 @@ import Ledger.Update (bkSgnCntW, bkSlotsPerEpoch, maxBkSz, maxHdrSz)
import Cardano.Chain.Common
( BlockCount(BlockCount)
, LovelacePortion(LovelacePortion)
, TxFeePolicy(TxFeePolicyUnknown)
, TxFeePolicy(TxFeePolicyTxSizeLinear)
, TxSizeLinear(TxSizeLinear)
, mkKnownLovelace
, mkStakeholderId
)

@@ -218,10 +221,8 @@ abEnvToCfg (_, vkgs, pps) = Genesis.Config genesisData genesisHash Nothing
(LovelacePortion 0)
(LovelacePortion 0)
(LovelacePortion 0)
--TODO: TxFeePolicyUnknown no longer exists, what is this supposed to be?
, Update.ppTxFeePolicy = TxFeePolicyUnknown
0
"Fee policy unspecified at \"Test.Cardano.Chain.Block.Validation.Spec\""
, Update.ppTxFeePolicy = TxFeePolicyTxSizeLinear
$ TxSizeLinear (mkKnownLovelace @0) (mkKnownLovelace @0)
, Update.ppUnlockStakeEpoch = 0
}

@@ -241,7 +241,7 @@ sizeEstimates
= let
sizeTestGen :: (Show a, Bi a) => Gen a -> Property
sizeTestGen g = sizeTest $ scfg { gen = g }
pm = ProtocolMagicId 0
pm = ProtocolMagicId 0

-- Explicit bounds for types, based on the generators from Gen.
attrUnitSize = (typeRep (Proxy @(Attributes ())), SizeConstant 1)
@@ -143,12 +143,7 @@ genTxSigData = TxSigData <$> genTxHash

genTxInWitness :: ProtocolMagicId -> Gen TxInWitness
genTxInWitness pm = Gen.choice gens
where
gens =
[ genPkWitness pm
, genRedeemWitness pm
, genScriptWitness
]
where gens = [genPkWitness pm, genRedeemWitness pm, genScriptWitness]

genTxUndo :: Gen TxUndo
genTxUndo = Gen.nonEmpty (Range.linear 1 10) $ Gen.maybe genTxOutAux

0 comments on commit a354ba6

Please sign in to comment.
You can’t perform that action at this time.