Skip to content

Commit 0c7bd95

Browse files
Update ouroboros-network/tests/lib/Test/Ouroboros/Network/TxSubmission/AppV2.hs
Co-authored-by: coot <coot@coot.me>
1 parent f0f6e70 commit 0c7bd95

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

  • ouroboros-network/tests/lib/Test/Ouroboros/Network/TxSubmission

ouroboros-network/tests/lib/Test/Ouroboros/Network/TxSubmission/AppV2.hs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -464,16 +464,14 @@ prop_txSubmission_inflight st@(TxSubmissionState state policy) =
464464
-- we work with txid's because a repeated tx may have different advertised/actual
465465
-- byte size by different peers in this test, but otherwise multiplicity
466466
-- should be determined by txid.
467+
fn :: Tx TxId -> Map TxId Int -> Map TxId Int
467468
fn tx r' -- | getTxAdvSize tx /= getTxSize tx
468469
-- = empty
469470
-- ^ that is too severe
470-
| Map.member (getTxId tx) r'
471-
, getTxValid tx
472-
= Map.update (Just . succ @Int) (getTxId tx) r'
473-
| getTxValid tx
474-
= Map.insert (getTxId tx) 1 r'
475-
| otherwise
476-
= r'
471+
| getTxValid tx
472+
= Map.alter (Just . maybe 1 succ) (getTxId tx) r'
473+
| otherwise
474+
= r'
477475

478476

479477
prop_sharedTxStateInvariant :: TxSubmissionState -> Property

0 commit comments

Comments
 (0)