Skip to content

Commit

Permalink
Fix some other test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
bartfrenk committed Nov 21, 2022
1 parent 2c5c9c2 commit 3154f96
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Expand Up @@ -37,6 +37,8 @@ import qualified Cardano.Node.Protocol.Shelley as Shelley
import Cardano.Node.Protocol.Types
import Cardano.Node.Types

import Cardano.Ledger.Shelley.Translation as SL


------------------------------------------------------------------------------
-- Real Cardano protocol
Expand Down Expand Up @@ -237,7 +239,7 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
--
-- Byron to Shelley hard fork parameters
Consensus.ProtocolTransitionParamsShelleyBased {
transitionTranslationContext = (),
transitionTranslationContext = SL.toFromByronTranslationContext shelleyGenesis,
transitionTrigger =
-- What will trigger the Byron -> Shelley hard fork?
case npcTestShelleyHardForkAtEpoch of
Expand Down
Expand Up @@ -43,6 +43,7 @@ import qualified Cardano.Ledger.Alonzo.Genesis as SL (AlonzoGenesis)
import qualified Cardano.Ledger.Conway.Genesis as SL (ConwayGenesis)
import Cardano.Ledger.Crypto
import qualified Cardano.Ledger.Era as Core
import qualified Cardano.Ledger.Shelley.Translation as SL

import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Byron.Ledger (ByronBlock)
Expand Down Expand Up @@ -243,7 +244,7 @@ instance Aeson.FromJSON CardanoConfig where
Aeson..!= (TriggerHardForkAtVersion majProtVer)

stas <- hsequence' $
f "TestShelleyHardForkAtEpoch" 2 (\_ -> ()) :*
f "TestShelleyHardForkAtEpoch" 2 (\_ -> SL.emptyFromByronTranslationContext) :*
f "TestAllegraHardForkAtEpoch" 3 (\_ -> ()) :*
f "TestMaryHardForkAtEpoch" 4 (\_ -> ()) :*
f "TestAlonzoHardForkAtEpoch" 5 fst :*
Expand Down
Expand Up @@ -31,6 +31,7 @@ import Test.ThreadNet.Network (TestNodeInitialization (..),
import qualified Cardano.Ledger.BaseTypes as SL (UnitInterval,
mkNonceFromNumber, unboundRational)
import qualified Cardano.Ledger.Shelley.API as SL
import qualified Cardano.Ledger.Shelley.Translation as SL
import qualified Cardano.Protocol.TPraos.OCert as SL
import Test.Util.HardFork.Future (singleEraFuture)
import Test.Util.Orphans.Arbitrary ()
Expand Down Expand Up @@ -369,6 +370,6 @@ prop_simple_real_tpraos_convergence TestSetup
ledgerConfig :: LedgerConfig (ShelleyBlock Proto Era)
ledgerConfig = Shelley.mkShelleyLedgerConfig
genesisConfig
() -- trivial translation context
SL.emptyFromByronTranslationContext
(fixedEpochInfo epochSize tpraosSlotLength)
(MaxMajorProtVer 1000) -- TODO

0 comments on commit 3154f96

Please sign in to comment.