summaryrefslogtreecommitdiffhomepage
path: root/HTTP/Server.hs
diff options
context:
space:
mode:
Diffstat (limited to 'HTTP/Server.hs')
-rw-r--r--HTTP/Server.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/HTTP/Server.hs b/HTTP/Server.hs
index dd35d1c..65d3d32 100644
--- a/HTTP/Server.hs
+++ b/HTTP/Server.hs
@@ -85,8 +85,9 @@ validObjectsize o = any (sz ==) knownObjectSizes
where
sz = B.length (fromStorableObject o)
-countObjects :: ServerState -> Handler CountResult
-countObjects = liftIO . countShares . serverStorage
+countObjects :: ServerState -> Maybe ProofOfWork -> Handler (POWGuarded CountResult)
+countObjects st pow = rateLimit (rateLimiter st) pow NoPOWIdent $
+ liftIO $ countShares $ serverStorage st
-- | 1 is a dummy value; the server does not know the actual share numbers.
dummyShareNum :: ShareNum