File tree Expand file tree Collapse file tree
ouroboros-network/tests/lib/Test/Ouroboros/Network/TxSubmission Expand file tree Collapse file tree Original file line number Diff line number Diff 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
479477prop_sharedTxStateInvariant :: TxSubmissionState -> Property
You can’t perform that action at this time.
0 commit comments