From 1652956786d73f020de534e935126c64c04eebd9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 14 Sep 2016 20:21:01 -0400 Subject: Reduce number of buckets in rate limiter, avoiding ones with very low proof of work. This got out of whack when sections were converted to rationals; there were buckets that needed trivial proofs of work, and having these extra buckets increased the total possible throughput. --- Types/Cost.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Types/Cost.hs') diff --git a/Types/Cost.hs b/Types/Cost.hs index 474db43..08f98eb 100644 --- a/Types/Cost.hs +++ b/Types/Cost.hs @@ -14,7 +14,10 @@ data Cost op deriving (Show, Eq, Ord) newtype Seconds = Seconds Rational - deriving (Num, Fractional, Eq, Ord, Show) + deriving (Num, Fractional, Eq, Ord) + +instance Show Seconds where + show (Seconds n) = show (fromRational n :: Double) ++ "s" -- | How many CPU cores a single run of an operation can be divided amoung. newtype Divisibility = Divisibility Integer -- cgit v1.2.3