Skip to content

Commit

Permalink
Merge pull request #339 from input-output-hk/newhoggy/delete-Protocol…
Browse files Browse the repository at this point in the history
…UTxOCostPerWordFeature

Delete `ProtocolUTXOCostPerWord` feature
  • Loading branch information
newhoggy authored Oct 25, 2023
2 parents f2ab681 + 0c299d1 commit c9f4831
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 125 deletions.
2 changes: 0 additions & 2 deletions cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,6 @@ genProtocolParameters era = do
protocolParamPoolPledgeInfluence <- genRationalInt64
protocolParamMonetaryExpansion <- genRational
protocolParamTreasuryCut <- genRational
protocolParamUTxOCostPerWord <- inEonForEra @ProtocolUTxOCostPerWordFeature (pure Nothing) (const (Just <$> genLovelace)) era
protocolParamCostModels <- pure mempty
--TODO: Babbage figure out how to deal with
-- asymmetric cost model JSON instances
Expand Down Expand Up @@ -935,7 +934,6 @@ genProtocolParametersUpdate era = do
protocolUpdatePoolPledgeInfluence <- Gen.maybe genRationalInt64
protocolUpdateMonetaryExpansion <- Gen.maybe genRational
protocolUpdateTreasuryCut <- Gen.maybe genRational
protocolUpdateUTxOCostPerWord <- inEonForEra @ProtocolUTxOCostPerWordFeature (pure Nothing) (const (Just <$> genLovelace)) era
let protocolUpdateCostModels = mempty -- genCostModels
--TODO: Babbage figure out how to deal with
-- asymmetric cost model JSON instances
Expand Down
2 changes: 2 additions & 0 deletions cardano-api/internal/Cardano/Api/Ledger/Lens.hs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ invalidHereAfterL :: Lens' L.ValidityInterval (Maybe SlotNo)
invalidHereAfterL = invalidHereAfterStrictL . strictMaybeL

-- | Lens to access the 'invalidBefore' field of a 'ValidityInterval' as a 'StrictMaybe SlotNo'.
-- Ideally this should be defined in cardano-ledger
invalidBeforeStrictL :: Lens' L.ValidityInterval (StrictMaybe SlotNo)
invalidBeforeStrictL = lens g s
where
Expand All @@ -91,6 +92,7 @@ invalidBeforeStrictL = lens g s
s (L.ValidityInterval _ b) a = L.ValidityInterval a b

-- | Lens to access the 'invalidHereAfter' field of a 'ValidityInterval' as a 'StrictMaybe SlotNo'.
-- Ideally this should be defined in cardano-ledger
invalidHereAfterStrictL :: Lens' L.ValidityInterval (StrictMaybe SlotNo)
invalidHereAfterStrictL = lens g s
where
Expand Down
Loading

0 comments on commit c9f4831

Please sign in to comment.