[input-output-hk/cardano-sl] [CBR-26] Error Handling Improvements (#3429)

KtorZ commented on this pull request.

> — <*> Gen.text (Range.constant 1 100) Gen.alphaNum)
— , WalletIsNotReadyToProcessPayments <$> genSyncProgress
— , NodeIsStillSyncing
— <$> (mkSyncPercentage
— <$> Gen.word8 (Range.constant 1 100))
— ]

-genSyncProgress :: Gen SyncProgress
-genSyncProgress = do
— estCompT <- Gen.word Range.constantBounded - blockCount <- Gen.word64 Range.constantBounded - pct <- (Gen.word8 $ Range.constant 0 100) - pure $ SyncProgress - (mkEstimatedCompletionTime estCompT) - (mkSyncThroughput $ BlockCount blockCount) - (mkSyncPercentage pct) This was removed in favor of proper `Arbitrary` instances. We were using `Arbitrary` instances as `Example` and defining these `Gen whatever` to generate actual arbitrary data. Non-sense.

Добавить комментарий