From 04e321fab1e901d505fefe846a7f053bee4bc526 Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Thu, 26 Dec 2024 17:27:40 +0100 Subject: [PATCH] Fix tests related to ouroboros-network --- cardano-node/test/Test/Cardano/Node/Gen.hs | 4 +- cardano-node/test/Test/Cardano/Node/POM.hs | 52 +++++++++---------- .../src/Testnet/Components/Configuration.hs | 1 + 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/cardano-node/test/Test/Cardano/Node/Gen.hs b/cardano-node/test/Test/Cardano/Node/Gen.hs index 44546e5c73e..fa01a2aad1b 100644 --- a/cardano-node/test/Test/Cardano/Node/Gen.hs +++ b/cardano-node/test/Test/Cardano/Node/Gen.hs @@ -182,7 +182,7 @@ genLocalRootPeersGroup = do ra <- genRootConfig hval <- Gen.int (Range.linear 0 (length (rootAccessPoints ra))) wval <- WarmValency <$> Gen.int (Range.linear 0 hval) - LocalRootPeersGroup ra (HotValency hval) wval <$> genPeerTrustable + LocalRootPeersGroup ra (HotValency hval) wval <$> genPeerTrustable <*> undefined -- TODO @ouroboros-network genLocalRootPeersGroups :: Gen LocalRootPeersGroups genLocalRootPeersGroups = @@ -212,7 +212,7 @@ genPeerSnapshotPath = Gen.element [ Nothing , Just . PeerSnapshotFile $ "dummy" - ] + ] genPeerTrustable :: Gen PeerTrustable genPeerTrustable = Gen.element [ IsNotTrustable, IsTrustable ] diff --git a/cardano-node/test/Test/Cardano/Node/POM.hs b/cardano-node/test/Test/Cardano/Node/POM.hs index f79b664c4d1..9e7a7f84bc0 100644 --- a/cardano-node/test/Test/Cardano/Node/POM.hs +++ b/cardano-node/test/Test/Cardano/Node/POM.hs @@ -143,10 +143,10 @@ testPartialYamlConfig = , pncDeadlineTargetOfKnownBigLedgerPeers = mempty , pncDeadlineTargetOfEstablishedBigLedgerPeers = mempty , pncDeadlineTargetOfActiveBigLedgerPeers = mempty - , pncSyncTargetNumberOfActivePeers = mempty - , pncSyncTargetNumberOfKnownBigLedgerPeers = mempty - , pncSyncTargetNumberOfEstablishedBigLedgerPeers = mempty - , pncSyncTargetNumberOfActiveBigLedgerPeers = mempty + , pncSyncTargetOfActivePeers = mempty + , pncSyncTargetOfKnownBigLedgerPeers = mempty + , pncSyncTargetOfEstablishedBigLedgerPeers = mempty + , pncSyncTargetOfActiveBigLedgerPeers = mempty , pncMinBigLedgerPeersForTrustedState = mempty , pncEnableP2P = Last (Just DisabledP2PMode) , pncPeerSharing = Last (Just PeerSharingDisabled) @@ -183,17 +183,17 @@ testPartialCliConfig = , pncTimeWaitTimeout = mempty , pncChainSyncIdleTimeout = mempty , pncAcceptedConnectionsLimit = mempty - , pncDeadlineTargetNumberOfRootPeers = mempty - , pncDeadlineTargetNumberOfKnownPeers = mempty - , pncDeadlineTargetNumberOfEstablishedPeers = mempty - , pncDeadlineTargetNumberOfActivePeers = mempty - , pncDeadlineTargetNumberOfKnownBigLedgerPeers = mempty - , pncDeadlineTargetNumberOfEstablishedBigLedgerPeers = mempty - , pncDeadlineTargetNumberOfActiveBigLedgerPeers = mempty - , pncSyncTargetNumberOfActivePeers = mempty - , pncSyncTargetNumberOfKnownBigLedgerPeers = mempty - , pncSyncTargetNumberOfEstablishedBigLedgerPeers = mempty - , pncSyncTargetNumberOfActiveBigLedgerPeers = mempty + , pncDeadlineTargetOfRootPeers = mempty + , pncDeadlineTargetOfKnownPeers = mempty + , pncDeadlineTargetOfEstablishedPeers = mempty + , pncDeadlineTargetOfActivePeers = mempty + , pncDeadlineTargetOfKnownBigLedgerPeers = mempty + , pncDeadlineTargetOfEstablishedBigLedgerPeers = mempty + , pncDeadlineTargetOfActiveBigLedgerPeers = mempty + , pncSyncTargetOfActivePeers = mempty + , pncSyncTargetOfKnownBigLedgerPeers = mempty + , pncSyncTargetOfEstablishedBigLedgerPeers = mempty + , pncSyncTargetOfActiveBigLedgerPeers = mempty , pncMinBigLedgerPeersForTrustedState = Last (Just defaultMinBigLedgerPeersForTrustedState) , pncEnableP2P = Last (Just DisabledP2PMode) , pncPeerSharing = Last (Just PeerSharingDisabled) @@ -236,17 +236,17 @@ eExpectedConfig = do , acceptedConnectionsSoftLimit = 384 , acceptedConnectionsDelay = 5 } - , ncDeadlineTargetNumberOfRootPeers = 60 - , ncDeadlineTargetNumberOfKnownPeers = 85 - , ncDeadlineTargetNumberOfEstablishedPeers = 40 - , ncDeadlineTargetNumberOfActivePeers = 15 - , ncDeadlineTargetNumberOfKnownBigLedgerPeers = 15 - , ncDeadlineTargetNumberOfEstablishedBigLedgerPeers = 10 - , ncDeadlineTargetNumberOfActiveBigLedgerPeers = 5 - , ncSyncTargetNumberOfActivePeers = 0 - , ncSyncTargetNumberOfKnownBigLedgerPeers = 100 - , ncSyncTargetNumberOfEstablishedBigLedgerPeers = 50 - , ncSyncTargetNumberOfActiveBigLedgerPeers = 30 + , ncDeadlineTargetOfRootPeers = 60 + , ncDeadlineTargetOfKnownPeers = 85 + , ncDeadlineTargetOfEstablishedPeers = 40 + , ncDeadlineTargetOfActivePeers = 15 + , ncDeadlineTargetOfKnownBigLedgerPeers = 15 + , ncDeadlineTargetOfEstablishedBigLedgerPeers = 10 + , ncDeadlineTargetOfActiveBigLedgerPeers = 5 + , ncSyncTargetOfActivePeers = 0 + , ncSyncTargetOfKnownBigLedgerPeers = 100 + , ncSyncTargetOfEstablishedBigLedgerPeers = 50 + , ncSyncTargetOfActiveBigLedgerPeers = 30 , ncMinBigLedgerPeersForTrustedState = defaultMinBigLedgerPeersForTrustedState , ncEnableP2P = SomeNetworkP2PMode Consensus.DisabledP2PMode , ncPeerSharing = PeerSharingDisabled diff --git a/cardano-testnet/src/Testnet/Components/Configuration.hs b/cardano-testnet/src/Testnet/Components/Configuration.hs index ddbf7fc741f..2e5686d0f1a 100644 --- a/cardano-testnet/src/Testnet/Components/Configuration.hs +++ b/cardano-testnet/src/Testnet/Components/Configuration.hs @@ -236,3 +236,4 @@ mkTopologyConfig numNodes allPorts port True = A.encodePretty topologyP2P [] DontUseLedgerPeers DontUseBootstrapPeers + Nothing