From 88202cb0184c6014603794e2050f6992bbf3b42a Mon Sep 17 00:00:00 2001 From: Alexander Esgen Date: Fri, 22 Nov 2024 18:20:31 +0100 Subject: [PATCH] `singleNodeTestConfigWith`: properly use Genesis window The unused `_eraParams` binding is likely an accidental leftover. The actual Genesis tests aren't affected as they use their own custom config defined in `Test.Consensus.PeerSimulator.Config`. --- .../src/unstable-consensus-testlib/Test/Util/TestBlock.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/TestBlock.hs b/ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/TestBlock.hs index c6ff558138..5ed7674f03 100644 --- a/ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/TestBlock.hs +++ b/ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/TestBlock.hs @@ -624,14 +624,12 @@ singleNodeTestConfigWith codecConfig storageConfig k genesisWindow = TopLevelCon ledgerCfgParams :: TestBlockLedgerConfig ledgerCfgParams = TestBlockLedgerConfig { - tblcHardForkParams = HardFork.defaultEraParams k slotLength, + tblcHardForkParams = (HardFork.defaultEraParams k slotLength) { + HardFork.eraGenesisWin = genesisWindow + }, tblcForecastRange = SNothing } - _eraParams :: HardFork.EraParams - _eraParams = (HardFork.defaultEraParams k slotLength) {HardFork.eraGenesisWin = genesisWindow} - - {------------------------------------------------------------------------------- Test blocks without payload -------------------------------------------------------------------------------}