Skip to content

Commit

Permalink
Fix tests related to ouroboros-network
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Dec 26, 2024
1 parent a888a30 commit b0112ed
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions cardano-node/test/Test/Cardano/Node/Gen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -212,7 +212,7 @@ genPeerSnapshotPath =
Gen.element
[ Nothing
, Just . PeerSnapshotFile $ "dummy"
]
]

genPeerTrustable :: Gen PeerTrustable
genPeerTrustable = Gen.element [ IsNotTrustable, IsTrustable ]
52 changes: 26 additions & 26 deletions cardano-node/test/Test/Cardano/Node/POM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions cardano-testnet/src/Testnet/Components/Configuration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,4 @@ mkTopologyConfig numNodes allPorts port True = A.encodePretty topologyP2P
[]
DontUseLedgerPeers
DontUseBootstrapPeers
Nothing

0 comments on commit b0112ed

Please sign in to comment.