Skip to content

Commit 086f290

Browse files
committed
fixup: improve score testing
Test the peer score functionality. Use arbitrary TxDecisionPolicy instead of the defaultTxDecisionPolicy.
1 parent 5169ff4 commit 086f290

3 files changed

Lines changed: 201 additions & 120 deletions

File tree

ouroboros-network/lib/Ouroboros/Network/TxSubmission/Inbound/V2/Policy.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ data TxDecisionPolicy = TxDecisionPolicy {
6464
interTxSpace :: !DiffTime
6565
-- ^ space between actual requests for the same TX.
6666
}
67-
deriving Show
67+
deriving (Eq, Show)
6868

6969
instance NFData TxDecisionPolicy where
7070
rnf TxDecisionPolicy{} = ()

ouroboros-network/lib/Ouroboros/Network/TxSubmission/Inbound/V2/State.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module Ouroboros.Network.TxSubmission.Inbound.V2.State
1212
, advertisingPeersForTxKeysExcept
1313
, advertisingPeersForTxExcept
1414
, removeAdvertisingPeersForResolvedTx
15+
, currentPeerScore
1516
, drainPeerScore
1617
, applyPeerRejections
1718
, sweepSharedState

0 commit comments

Comments
 (0)